diff options
-rw-r--r-- | meta/classes/cmake.bbclass | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass index d3f0d70847..a5cffedbc6 100644 --- a/meta/classes/cmake.bbclass +++ b/meta/classes/cmake.bbclass | |||
@@ -26,14 +26,16 @@ python() { | |||
26 | if not d.getVar('OECMAKE_C_COMPILER'): | 26 | if not d.getVar('OECMAKE_C_COMPILER'): |
27 | cc_list = d.getVar('CC').split() | 27 | cc_list = d.getVar('CC').split() |
28 | if cc_list[0] == 'ccache': | 28 | if cc_list[0] == 'ccache': |
29 | d.setVar('OECMAKE_C_COMPILER', '%s %s' % (cc_list[0], cc_list[1])) | 29 | d.setVar('OECMAKE_C_COMPILER_LAUNCHER', cc_list[0]) |
30 | d.setVar('OECMAKE_C_COMPILER', cc_list[1]) | ||
30 | else: | 31 | else: |
31 | d.setVar('OECMAKE_C_COMPILER', cc_list[0]) | 32 | d.setVar('OECMAKE_C_COMPILER', cc_list[0]) |
32 | 33 | ||
33 | if not d.getVar('OECMAKE_CXX_COMPILER'): | 34 | if not d.getVar('OECMAKE_CXX_COMPILER'): |
34 | cxx_list = d.getVar('CXX').split() | 35 | cxx_list = d.getVar('CXX').split() |
35 | if cxx_list[0] == 'ccache': | 36 | if cxx_list[0] == 'ccache': |
36 | d.setVar('OECMAKE_CXX_COMPILER', '%s %s' % (cxx_list[0], cxx_list[1])) | 37 | d.setVar('OECMAKE_CXX_COMPILER_LAUNCHER', cxx_list[0]) |
38 | d.setVar('OECMAKE_CXX_COMPILER', cxx_list[1]) | ||
37 | else: | 39 | else: |
38 | d.setVar('OECMAKE_CXX_COMPILER', cxx_list[0]) | 40 | d.setVar('OECMAKE_CXX_COMPILER', cxx_list[0]) |
39 | } | 41 | } |
@@ -49,6 +51,9 @@ OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LD | |||
49 | CXXFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}" | 51 | CXXFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}" |
50 | CFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}" | 52 | CFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}" |
51 | 53 | ||
54 | OECMAKE_C_COMPILER_LAUNCHER ?= "" | ||
55 | OECMAKE_CXX_COMPILER_LAUNCHER ?= "" | ||
56 | |||
52 | OECMAKE_RPATH ?= "" | 57 | OECMAKE_RPATH ?= "" |
53 | OECMAKE_PERLNATIVE_DIR ??= "" | 58 | OECMAKE_PERLNATIVE_DIR ??= "" |
54 | OECMAKE_EXTRA_ROOT_PATH ?= "" | 59 | OECMAKE_EXTRA_ROOT_PATH ?= "" |
@@ -86,6 +91,8 @@ set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\). | |||
86 | set( CMAKE_SYSTEM_PROCESSOR ${@map_target_arch_to_uname_arch(d.getVar('TARGET_ARCH'))} ) | 91 | set( CMAKE_SYSTEM_PROCESSOR ${@map_target_arch_to_uname_arch(d.getVar('TARGET_ARCH'))} ) |
87 | set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} ) | 92 | set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} ) |
88 | set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} ) | 93 | set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} ) |
94 | set( CMAKE_C_COMPILER_LAUNCHER ${OECMAKE_C_COMPILER_LAUNCHER} ) | ||
95 | set( CMAKE_CXX_COMPILER_LAUNCHER ${OECMAKE_CXX_COMPILER_LAUNCHER} ) | ||
89 | set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} ) | 96 | set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} ) |
90 | set( CMAKE_AR ${OECMAKE_AR} CACHE FILEPATH "Archiver" ) | 97 | set( CMAKE_AR ${OECMAKE_AR} CACHE FILEPATH "Archiver" ) |
91 | set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" ) | 98 | set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" ) |