[Cmake-commits] CMake branch, next, updated. v3.0.0-rc4-3081-gf4f59f4
Stephen Kelly
steveire at gmail.com
Fri May 9 11:33:05 EDT 2014
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 f4f59f4b1e1a40e1f63afc4bfc53dd4ceb265f2e (commit)
via 6a9fdbeb48eb16a0f7082329f0d0840bf0c0a98c (commit)
from 72fb3b274cae0c69f5148a5e16158174b3273a78 (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=f4f59f4b1e1a40e1f63afc4bfc53dd4ceb265f2e
commit f4f59f4b1e1a40e1f63afc4bfc53dd4ceb265f2e
Merge: 72fb3b2 6a9fdbe
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 9 11:33:04 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 9 11:33:04 2014 -0400
Merge topic 'minor-cleanups' into next
6a9fdbeb Test: Parameterize the language in the CompileFeature test.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a9fdbeb48eb16a0f7082329f0d0840bf0c0a98c
commit 6a9fdbeb48eb16a0f7082329f0d0840bf0c0a98c
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 9 17:27:55 2014 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Fri May 9 17:29:05 2014 +0200
Test: Parameterize the language in the CompileFeature test.
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 925f757..adf50d5 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -34,25 +34,29 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU
)
endif()
-if (CMAKE_CXX_COMPILE_FEATURES)
- foreach(feature ${CXX_non_features})
- message("Testing feature : ${feature}")
- try_compile(${feature}_works
- "${CMAKE_CURRENT_BINARY_DIR}/${feature}_test"
- "${CMAKE_CURRENT_SOURCE_DIR}/feature_test.cpp"
- COMPILE_DEFINITIONS "-DTEST=${CMAKE_CURRENT_SOURCE_DIR}/${feature}.cpp"
- CMAKE_FLAGS "-DCMAKE_CXX_STANDARD=11"
- OUTPUT_VARIABLE OUTPUT
- )
- if (${feature}_works)
- message(SEND_ERROR
- "Feature ${feature} expected not to work for ${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}.
-Update the supported features or blacklist it.\n${OUTPUT}")
- else()
- message("Testing feature : ${feature} -- Fails, as expected.")
- endif()
- endforeach()
-endif()
+set(CXX_ext cpp)
+set(CXX_standard_flag 11)
+foreach(lang CXX)
+ if (CMAKE_${lang}_COMPILE_FEATURES)
+ foreach(feature ${${lang}_non_features})
+ message("Testing feature : ${feature}")
+ try_compile(${feature}_works
+ "${CMAKE_CURRENT_BINARY_DIR}/${feature}_test"
+ "${CMAKE_CURRENT_SOURCE_DIR}/feature_test.${${lang}_ext}"
+ COMPILE_DEFINITIONS "-DTEST=${CMAKE_CURRENT_SOURCE_DIR}/${feature}.${${lang}_ext}"
+ CMAKE_FLAGS "-DCMAKE_${lang}_STANDARD=${${lang}_standard_flag}"
+ OUTPUT_VARIABLE OUTPUT
+ )
+ if (${feature}_works)
+ message(SEND_ERROR
+ "Feature ${feature} expected not to work for ${lang} ${CMAKE_${lang}_COMPILER_ID}-${CMAKE_${lang}_COMPILER_VERSION}.
+ Update the supported features or blacklist it.\n${OUTPUT}")
+ else()
+ message("Testing feature : ${feature} -- Fails, as expected.")
+ endif()
+ endforeach()
+ endif()
+endforeach()
add_executable(CompileFeatures main.cpp)
set_property(TARGET CompileFeatures
-----------------------------------------------------------------------
Summary of changes:
Tests/CompileFeatures/CMakeLists.txt | 42 +++++++++++++++++++---------------
1 file changed, 23 insertions(+), 19 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list