diff options
author | Urs Fässler <urs.fassler@bbv.ch> | 2018-08-08 09:33:52 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-14 11:36:31 +0100 |
commit | 483143a38ec0ac7b12b9cdf3cd5ce79d8f20cb2f (patch) | |
tree | 16f6c39852037d781d065c830765f8985902adbf /meta | |
parent | c1e8a02609fb308221e77b703436f7e38e67214b (diff) | |
download | poky-483143a38ec0ac7b12b9cdf3cd5ce79d8f20cb2f.tar.gz |
cmake: fix compiling some C++ projects with Yocto SDK and GCC
Setting CMAKE_SYSROOT in the toolchain file allows CMake to correctly
remove user-provided system include directories pointing to
<sysroot>/usr/include. The mentioned projects failed with "stdlib.h:
No such file or directory #include_next <stdlib.h>".
(From OE-Core rev: cb42802f2fe1760f894a435b07286bca3a220364)
Signed-off-by: Urs Fässler <urs.fassler@bbv.ch>
Signed-off-by: Raphael Freudiger <raphael.freudiger@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake index d52c29e5a1..8a0fb4cb12 100644 --- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake +++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | |||
@@ -3,6 +3,7 @@ set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE ) | |||
3 | set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE ) | 3 | set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE ) |
4 | set( CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE ) | 4 | set( CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE ) |
5 | set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE ) | 5 | set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE ) |
6 | set( CMAKE_SYSROOT $ENV{OECORE_TARGET_SYSROOT} ) | ||
6 | 7 | ||
7 | set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} ) | 8 | set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} ) |
8 | set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) | 9 | set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) |