[oe-commits] [openembedded-core] 01/21: cmake: set CMAKE_NO_SYSTEM_FROM_IMPORTED to ON

git at git.openembedded.org git at git.openembedded.org
Tue Sep 6 14:38:26 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 18041f171fd0bdedc669c51b9ac494a4c8fc335c
Author: Jack Mitchell <jack at embed.me.uk>
AuthorDate: Tue Sep 6 14:21:19 2016 +0100

    cmake: set CMAKE_NO_SYSTEM_FROM_IMPORTED to ON
    
    set CMAKE_NO_SYSTEM_FROM_IMPORTED to ON in the bbclass
    and also the toolchain file. This is required as GCC6
    has become more tetchy about the use of -isystem in the
    compiler flags.
    
    Imported targets aren't used much in cmake at the moment which
    is why errors have been rare and probably worked around in
    different ways prior to this patch.
    
    Signed-off-by: Jack Mitchell <jack at embed.me.uk>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/cmake.bbclass                                | 1 +
 meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | 1 +
 2 files changed, 2 insertions(+)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 5203d8a..8339a6b 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -57,6 +57,7 @@ set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "Additi
 set( CMAKE_ASM_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "Additional ASM FLAGS for release" )
 set( CMAKE_C_LINK_FLAGS "${OECMAKE_C_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
 set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
+set( CMAKE_NO_SYSTEM_FROM_IMPORTED ON )
 
 # only search in the paths provided so cmake doesnt pick
 # up libraries and tools from the native build machine
diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
index 60014bb..8279eb6 100644
--- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
+++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -7,6 +7,7 @@ set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
 set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
 set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+set( CMAKE_NO_SYSTEM_FROM_IMPORTED ON )
 
 string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT})
 string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list