public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCHv2] cmake: set CMAKE_NO_SYSTEM_FROM_IMPORTED to ON
@ 2016-09-06 13:21 Jack Mitchell
  2016-09-06 15:56 ` Andreas Müller
  0 siblings, 1 reply; 2+ messages in thread
From: Jack Mitchell @ 2016-09-06 13:21 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jack Mitchell

From: Jack Mitchell <jack@embed.me.uk>

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@embed.me.uk>
---
 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})
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCHv2] cmake: set CMAKE_NO_SYSTEM_FROM_IMPORTED to ON
  2016-09-06 13:21 [PATCHv2] cmake: set CMAKE_NO_SYSTEM_FROM_IMPORTED to ON Jack Mitchell
@ 2016-09-06 15:56 ` Andreas Müller
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Müller @ 2016-09-06 15:56 UTC (permalink / raw)
  To: Jack Mitchell
  Cc: Jack Mitchell, Patches and discussions about the oe-core layer

On Tue, Sep 6, 2016 at 3:21 PM, Jack Mitchell <ml@embed.me.uk> wrote:
> From: Jack Mitchell <jack@embed.me.uk>
>
> 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@embed.me.uk>
> ---
>  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})
> --
> 2.9.3
>
Why not simply adding

-DCMAKE_NO_SYSTEM_FROM_IMPORTED=1

to cmake to avoid redundancy [1].

[1] https://github.com/schnitzeltony/oe-core/commit/930af34efb08c359541514e202173ec93a3a19c7

Andreas


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-06 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-06 13:21 [PATCHv2] cmake: set CMAKE_NO_SYSTEM_FROM_IMPORTED to ON Jack Mitchell
2016-09-06 15:56 ` Andreas Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox