diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-06-06 18:29:19 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-11 13:49:51 +0100 |
commit | 429004f6a583a593ef50841eda96f7c72c80d79b (patch) | |
tree | 9362949c92ed3efe31012a913a4724a952edd5d8 /meta | |
parent | 4b55c928c1f0e0060325c13d317cc3f373048c1f (diff) | |
download | poky-429004f6a583a593ef50841eda96f7c72c80d79b.tar.gz |
cmake.bbclass: Add OECMAKE_C_LINK_FLAGS and OECMAKE_CXX_LINK_FLAGS variables
In some cases we need to specify linker flags and right
now we do not have a way to communicate that to cmake
based systems. cmake defines CMAKE_C_LINK_FLAGS and CMAKE_CXX_LINK_FLAGS
for these needs. This patch therefore defines two local variables
namely OECMAKE_C_LINK_FLAGS and OECMAKE_CXX_LINK_FLAGS which
can be altered by recipes to tweak linker flags
(From OE-Core rev: 9e00a74749ba8e1cf0d15efe8e16af60b189e080)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/cmake.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass index dcd974ab2d..eda45ddd14 100644 --- a/meta/classes/cmake.bbclass +++ b/meta/classes/cmake.bbclass | |||
@@ -23,6 +23,8 @@ OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS}" | |||
23 | OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} -fpermissive" | 23 | OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} -fpermissive" |
24 | OECMAKE_C_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CPPFLAGS} -DNDEBUG" | 24 | OECMAKE_C_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CPPFLAGS} -DNDEBUG" |
25 | OECMAKE_CXX_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CXXFLAGS} -DNDEBUG" | 25 | OECMAKE_CXX_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CXXFLAGS} -DNDEBUG" |
26 | OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}" | ||
27 | OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}" | ||
26 | 28 | ||
27 | OECMAKE_RPATH ?= "" | 29 | OECMAKE_RPATH ?= "" |
28 | OECMAKE_PERLNATIVE_DIR ??= "" | 30 | OECMAKE_PERLNATIVE_DIR ??= "" |
@@ -40,6 +42,8 @@ set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" ) | |||
40 | set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" ) | 42 | set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" ) |
41 | set( CMAKE_C_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "CFLAGS for release" ) | 43 | set( CMAKE_C_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "CFLAGS for release" ) |
42 | set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLAGS for release" ) | 44 | set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLAGS for release" ) |
45 | set( CMAKE_C_LINK_FLAGS "${OECMAKE_C_LINK_FLAGS}" CACHE STRING "LDFLAGS" ) | ||
46 | set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" ) | ||
43 | 47 | ||
44 | # only search in the paths provided so cmake doesnt pick | 48 | # only search in the paths provided so cmake doesnt pick |
45 | # up libraries and tools from the native build machine | 49 | # up libraries and tools from the native build machine |