[Cmake-commits] CMake branch, next, updated. v3.7.0-1307-g2a46ccf

Brad King brad.king at kitware.com
Mon Nov 21 13:41:15 EST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  2a46ccf4a510d719956769de05e6df2f160005b5 (commit)
       via  460052516fdd06a2c0c765359f4d92006e67283b (commit)
      from  17a67400ee5eee12577e446a029adb65bd16c394 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a46ccf4a510d719956769de05e6df2f160005b5
commit 2a46ccf4a510d719956769de05e6df2f160005b5
Merge: 17a6740 4600525
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 21 13:41:15 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Nov 21 13:41:15 2016 -0500

    Merge topic 'imported-interface-no-system' into next
    
    46005251 Allow NO_SYSTEM_FROM_IMPORTED on imported INTERFACE libraries


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=460052516fdd06a2c0c765359f4d92006e67283b
commit 460052516fdd06a2c0c765359f4d92006e67283b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 21 10:42:24 2016 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Nov 21 11:42:01 2016 -0500

    Allow NO_SYSTEM_FROM_IMPORTED on imported INTERFACE libraries
    
    Imported INTERFACE libraries can specify include directories via
    `INTERFACE_INCLUDE_DIRECTORIES` so the default behavior of treating them
    as system include directories applies.  Allow users to turn this off by
    setting `NO_SYSTEM_FROM_IMPORTED` on such targets.
    
    Closes: #16443

diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst
index 89b010d..2e6a803 100644
--- a/Help/manual/cmake-buildsystem.7.rst
+++ b/Help/manual/cmake-buildsystem.7.rst
@@ -964,6 +964,7 @@ are:
 * ``EXPORT_NAME``
 * ``IMPORTED``
 * ``NAME``
+* ``NO_SYSTEM_FROM_IMPORTED``
 * Properties matching ``IMPORTED_LIBNAME_*``
 * Properties matching ``MAP_IMPORTED_CONFIG_*``
 
diff --git a/Help/release/dev/imported-interface-no-system.rst b/Help/release/dev/imported-interface-no-system.rst
new file mode 100644
index 0000000..3a727cc
--- /dev/null
+++ b/Help/release/dev/imported-interface-no-system.rst
@@ -0,0 +1,5 @@
+imported-interface-no-system
+----------------------------
+
+* The :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` target property is now supported
+  on :ref:`Imported <Imported Targets>` :ref:`Interface Libraries`.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 54bdfe6..f5d9e61 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -253,7 +253,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
     this->SetPropertyDefault("WIN32_EXECUTABLE", CM_NULLPTR);
     this->SetPropertyDefault("MACOSX_BUNDLE", CM_NULLPTR);
     this->SetPropertyDefault("MACOSX_RPATH", CM_NULLPTR);
-    this->SetPropertyDefault("NO_SYSTEM_FROM_IMPORTED", CM_NULLPTR);
     this->SetPropertyDefault("C_CLANG_TIDY", CM_NULLPTR);
     this->SetPropertyDefault("C_COMPILER_LAUNCHER", CM_NULLPTR);
     this->SetPropertyDefault("C_INCLUDE_WHAT_YOU_USE", CM_NULLPTR);
@@ -271,6 +270,10 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
     this->SetPropertyDefault("LINK_SEARCH_END_STATIC", CM_NULLPTR);
   }
 
+  if (this->GetType() != cmStateEnums::UTILITY) {
+    this->SetPropertyDefault("NO_SYSTEM_FROM_IMPORTED", CM_NULLPTR);
+  }
+
   // Collect the set of configuration types.
   std::vector<std::string> configNames;
   mf->GetConfigurations(configNames);
diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx
index 3a9bddb..a57bc5a 100644
--- a/Source/cmTargetPropertyComputer.cxx
+++ b/Source/cmTargetPropertyComputer.cxx
@@ -66,6 +66,7 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty(
   }
 
   if (prop == "IMPORTED_CONFIGURATIONS" || prop == "IMPORTED_LIBNAME" ||
+      prop == "NO_SYSTEM_FROM_IMPORTED" ||
       cmHasLiteralPrefix(prop, "IMPORTED_LIBNAME_") ||
       cmHasLiteralPrefix(prop, "MAP_IMPORTED_CONFIG_")) {
     return true;
diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt
index 3db210a..33c4b90 100644
--- a/Tests/InterfaceLibrary/CMakeLists.txt
+++ b/Tests/InterfaceLibrary/CMakeLists.txt
@@ -64,6 +64,7 @@ target_link_libraries(iface_whitelist INTERFACE $<$<BOOL:$<TARGET_PROPERTY:CUSTO
 add_executable(exec_whitelist dummy.cpp)
 target_link_libraries(exec_whitelist iface_whitelist)
 
+set(CMAKE_NO_SYSTEM_FROM_IMPORTED 1)
 add_library(iface_imported INTERFACE IMPORTED)
 set_property(TARGET iface_imported PROPERTY
   INTERFACE_COMPILE_DEFINITIONS

-----------------------------------------------------------------------

Summary of changes:
 Help/manual/cmake-buildsystem.7.rst               |    1 +
 Help/release/dev/imported-interface-no-system.rst |    5 +++++
 Source/cmTarget.cxx                               |    5 ++++-
 Source/cmTargetPropertyComputer.cxx               |    1 +
 Tests/InterfaceLibrary/CMakeLists.txt             |    1 +
 5 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 Help/release/dev/imported-interface-no-system.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list