[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5051-gd0021bd

Stephen Kelly steveire at gmail.com
Mon Nov 11 10:12:01 EST 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  d0021bd26807e5900a686edfa9880561032560b3 (commit)
       via  394032b2a1490ae72fc5a5295e421e3c3771b359 (commit)
       via  59754573942c5dd7a540ded35b54bf781f529bb8 (commit)
      from  5721bb16e15f2fb68d94b4419c689fd18d130a01 (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=d0021bd26807e5900a686edfa9880561032560b3
commit d0021bd26807e5900a686edfa9880561032560b3
Merge: 5721bb1 394032b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Nov 11 10:11:56 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Nov 11 10:11:56 2013 -0500

    Merge topic 'target_compile_features' into next
    
    394032b Add test which outputs the feature_tests.cxx file compiled.
    5975457 Generate the feature test source file in CMakeFiles.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=394032b2a1490ae72fc5a5295e421e3c3771b359
commit 394032b2a1490ae72fc5a5295e421e3c3771b359
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Nov 11 16:10:48 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Nov 11 16:10:48 2013 +0100

    Add test which outputs the feature_tests.cxx file compiled.

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 7b390ad..4cb912d 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2094,6 +2094,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
   ADD_TEST_MACRO(CMakeCommands.target_compile_definitions target_compile_definitions)
   ADD_TEST_MACRO(CMakeCommands.target_compile_options target_compile_options)
   ADD_TEST_MACRO(CMakeCommands.target_compile_features target_compile_features)
+  ADD_TEST_MACRO(compile_features compile_features)
 
   configure_file(
     "${CMake_SOURCE_DIR}/Tests/CTestTestCrash/test.cmake.in"
diff --git a/Tests/compile_features/CMakeLists.txt b/Tests/compile_features/CMakeLists.txt
new file mode 100644
index 0000000..c234357
--- /dev/null
+++ b/Tests/compile_features/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 2.8.12)
+cmake_policy(SET CMP0025 NEW)
+project(compile_features)
+
+if (EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.cxx")
+  file(READ "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.cxx" featureTest)
+  message("_CMAKE_CXX_CREATE_OBJECT_FILE: ${_CMAKE_CXX_CREATE_OBJECT_FILE}")
+  message("_compile_object_command: ${_compile_object_command}")
+  message("CTEST_FULL_OUTPUT\n${featureTest}")
+else()
+  message("No known features!")
+endif()
+
+add_executable(compile_features main.cpp)
diff --git a/Tests/compile_features/main.cpp b/Tests/compile_features/main.cpp
new file mode 100644
index 0000000..341aaaf
--- /dev/null
+++ b/Tests/compile_features/main.cpp
@@ -0,0 +1,5 @@
+
+int main(int, char **)
+{
+  return 0;
+}

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=59754573942c5dd7a540ded35b54bf781f529bb8
commit 59754573942c5dd7a540ded35b54bf781f529bb8
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Nov 11 15:59:32 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Nov 11 15:59:32 2013 +0100

    Generate the feature test source file in CMakeFiles.

diff --git a/Modules/Internal/FeatureTesting.cmake b/Modules/Internal/FeatureTesting.cmake
index 5bb7ddb..a0f6d4c 100644
--- a/Modules/Internal/FeatureTesting.cmake
+++ b/Modules/Internal/FeatureTesting.cmake
@@ -4,7 +4,7 @@ macro(record_compiler_features lang compile_flags feature_list)
 
   string(TOLOWER ${lang} lang_lc)
   file(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests${CMAKE_${lang}_OUTPUT_EXTENSION}")
-  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/feature_tests.${lang_lc}" "
+  file(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.${lang_lc}" "
   extern const char features[] = {\"\"\n")
   foreach(feature ${CMAKE_${lang}_KNOWN_FEATURES})
     if (_cmake_feature_test_${feature})
@@ -13,13 +13,13 @@ macro(record_compiler_features lang compile_flags feature_list)
       else()
         set(_feature_condition "#if ${_cmake_feature_test_${feature}}\n\"1\"\n#else\n\"0\"\n#endif\n")
       endif()
-      file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/feature_tests.${lang_lc}" "\"${lang}_FEATURE:\"\n${_feature_condition}\"${feature}\\n\"\n")
+      file(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.${lang_lc}" "\"${lang}_FEATURE:\"\n${_feature_condition}\"${feature}\\n\"\n")
     endif()
   endforeach()
-  file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/feature_tests.${lang_lc}" "\n};\n")
+  file(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.${lang_lc}" "\n};\n")
 
   string(REPLACE "<FLAGS>" "${compile_flags}" _compile_object_command "${_CMAKE_${lang}_CREATE_OBJECT_FILE}" )
-  string(REPLACE "<SOURCE>" "${CMAKE_CURRENT_BINARY_DIR}/feature_tests.${lang_lc}" _compile_object_command "${_compile_object_command}" )
+  string(REPLACE "<SOURCE>" "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.${lang_lc}" _compile_object_command "${_compile_object_command}" )
   execute_process(COMMAND ${_compile_object_command}
     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/CMakeFiles"
     ERROR_VARIABLE _error

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

Summary of changes:
 Modules/Internal/FeatureTesting.cmake              |    8 ++++----
 Tests/CMakeLists.txt                               |    1 +
 Tests/compile_features/CMakeLists.txt              |   14 ++++++++++++++
 .../dummy.cpp => compile_features/main.cpp}        |    0
 4 files changed, 19 insertions(+), 4 deletions(-)
 create mode 100644 Tests/compile_features/CMakeLists.txt
 copy Tests/{CMakeCommands/target_compile_features/dummy.cpp => compile_features/main.cpp} (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list