[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4304-g316dfb0

Stephen Kelly steveire at gmail.com
Tue Sep 24 14:00:28 EDT 2013


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  316dfb0f9c1d1eb72c2c87e491354113c5869e54 (commit)
       via  b215bce58fd1e433f36d3a85e576f00718e9cfdf (commit)
      from  423bd677069347e3ef77bfc7e97c902a994701a1 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=316dfb0f9c1d1eb72c2c87e491354113c5869e54
commit 316dfb0f9c1d1eb72c2c87e491354113c5869e54
Merge: 423bd67 b215bce
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Sep 24 14:00:25 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 24 14:00:25 2013 -0400

    Merge topic 'IMPORTED-target-SYSTEM-includes' into next
    
    b215bce Don't behave differently during try_compiles.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b215bce58fd1e433f36d3a85e576f00718e9cfdf
commit b215bce58fd1e433f36d3a85e576f00718e9cfdf
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Sep 24 19:58:31 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Sep 24 19:58:31 2013 +0200

    Don't behave differently during try_compiles.
    
    It doesn't make sense to behave differently.
    
    Also update the try_compile tests to actually do tests. Previously
    they were not run or checked properly.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 98ad0f5..2fe771b 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2683,8 +2683,7 @@ void cmTarget::FinalizeSystemIncludeDirectories()
       }
     if (tgt->IsImported()
         && tgt->GetProperty("INTERFACE_INCLUDE_DIRECTORIES")
-        && !this->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED")
-        && !this->Makefile->GetCMakeInstance()->GetIsInTryCompile())
+        && !this->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED"))
       {
       std::string includeGenex = "$<TARGET_PROPERTY:" +
                                 it->Value + ",INTERFACE_INCLUDE_DIRECTORIES>";
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 82b25a8..ebe4af2 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -284,10 +284,15 @@ if (((CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION VERSION_GREA
     target_compile_options(test_system_exp PRIVATE -Wunused-variable -Werror=unused-variable)
 
     unset(EXP_ERROR_VARIABLE CACHE)
-    set(CMAKE_REQUIRED_LIBRARIES exp_systemlib)
-    check_cxx_compiler_flag(-Wunused-variable -Werror=unused-variable EXP_ERROR_VARIABLE)
-    if(EXP_ERROR_VARIABLE)
-      message(SEND_ERROR "EXP_ERROR_VARIABLE try_compile succeeded, but it was expected to fail.")
+    try_compile(EXP_ERROR_VARIABLE
+      "${CMAKE_CURRENT_SOURCE_DIR}/test_system"
+      "${CMAKE_CURRENT_SOURCE_DIR}/test_system.cpp"
+      COMPILE_DEFINITIONS "-Wunused-variable -Werror=unused-variable"
+      LINK_LIBRARIES exp_systemlib
+      OUTPUT_VARIABLE OUTPUT
+      )
+    if(NOT EXP_ERROR_VARIABLE)
+      message(SEND_ERROR "EXP_ERROR_VARIABLE try_compile failed, but it was expected to succeed ${OUTPUT}.")
     endif()
 
     add_executable(test_system_bld test_system.cpp)
@@ -295,10 +300,15 @@ if (((CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION VERSION_GREA
     target_compile_options(test_system_bld PRIVATE -Wunused-variable -Werror=unused-variable)
 
     unset(BLD_ERROR_VARIABLE CACHE)
-    set(CMAKE_REQUIRED_LIBRARIES bld_systemlib)
-    check_cxx_compiler_flag(-Wunused-variable -Werror=unused-variable BLD_ERROR_VARIABLE)
-    if(BLD_ERROR_VARIABLE)
-      message(SEND_ERROR "BLD_ERROR_VARIABLE try_compile succeeded, but it was expected to fail.")
+    try_compile(BLD_ERROR_VARIABLE
+      "${CMAKE_CURRENT_SOURCE_DIR}/test_system"
+      "${CMAKE_CURRENT_SOURCE_DIR}/test_system.cpp"
+      COMPILE_DEFINITIONS "-Wunused-variable -Werror=unused-variable"
+      LINK_LIBRARIES bld_systemlib
+      OUTPUT_VARIABLE OUTPUT
+      )
+    if(NOT BLD_ERROR_VARIABLE)
+      message(SEND_ERROR "BLD_ERROR_VARIABLE try_compile failed, but it was expected to succeed.")
     endif()
   endif()
 endif()

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

Summary of changes:
 Source/cmTarget.cxx                        |    3 +--
 Tests/ExportImport/Import/A/CMakeLists.txt |   26 ++++++++++++++++++--------
 2 files changed, 19 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list