[Cmake-commits] CMake branch, next, updated. v3.7.1-1522-g258901c
Brad King
brad.king at kitware.com
Tue Dec 6 08:58:26 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 258901cd19d9bee049e65ae347536255b00fbe9d (commit)
via b8d9541aead07ddca4152d232c20924fd906a1f2 (commit)
from 860ad8e96ac20c8fb77ee853b7c18b15db1747f1 (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=258901cd19d9bee049e65ae347536255b00fbe9d
commit 258901cd19d9bee049e65ae347536255b00fbe9d
Merge: 860ad8e b8d9541
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 6 08:58:24 2016 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Dec 6 08:58:24 2016 -0500
Merge topic 'try_compile-lang-std' into next
b8d9541a fixup! try_compile: Add options to specify language standards
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8d9541aead07ddca4152d232c20924fd906a1f2
commit b8d9541aead07ddca4152d232c20924fd906a1f2
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 6 08:37:01 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Dec 6 08:51:55 2016 -0500
fixup! try_compile: Add options to specify language standards
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 5eb39bb..1b88d46 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -215,14 +215,19 @@ add_RunCMake_test(project -DCMake_TEST_RESOURCES=${CMake_TEST_RESOURCES})
add_RunCMake_test(return)
add_RunCMake_test(set_property)
add_RunCMake_test(string)
-add_RunCMake_test(try_compile
- -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
- -DCMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION}
- -DCMAKE_C_STANDARD_DEFAULT=${CMAKE_C_STANDARD_DEFAULT}
- -DCMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID}
- -DCMAKE_CXX_COMPILER_VERSION=${CMAKE_CXX_COMPILER_VERSION}
- -DCMAKE_CXX_STANDARD_DEFAULT=${CMAKE_CXX_STANDARD_DEFAULT}
- )
+foreach(var
+ CMAKE_C_COMPILER_ID
+ CMAKE_C_COMPILER_VERSION
+ CMAKE_C_STANDARD_DEFAULT
+ CMAKE_CXX_COMPILER_ID
+ CMAKE_CXX_COMPILER_VERSION
+ CMAKE_CXX_STANDARD_DEFAULT
+ )
+ if(DEFINED ${var})
+ list(APPEND try_compile_ARGS -D${var}=${${var}})
+ endif()
+endforeach()
+add_RunCMake_test(try_compile)
add_RunCMake_test(try_run)
add_RunCMake_test(set)
add_RunCMake_test(variable_watch)
diff --git a/Tests/RunCMake/try_compile/CxxStandardGNU.cxx b/Tests/RunCMake/try_compile/CxxStandardGNU.cxx
index 6ea1792..7990a78 100644
--- a/Tests/RunCMake/try_compile/CxxStandardGNU.cxx
+++ b/Tests/RunCMake/try_compile/CxxStandardGNU.cxx
@@ -1,4 +1,5 @@
-#if __cplusplus != 201103L
+#if __cplusplus != 201103L && \
+ !(__cplusplus < 201103L && defined(__GXX_EXPERIMENTAL_CXX0X__))
#error "Not GNU C++ 11 mode!"
#endif
#ifndef __STRICT_ANSI__
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
index 67068c0..d1b0217 100644
--- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
@@ -27,12 +27,12 @@ run_cmake(TargetTypeStatic)
if(CMAKE_C_STANDARD_DEFAULT)
run_cmake(CStandard)
-else()
+elseif(DEFINED CMAKE_C_STANDARD_DEFAULT)
run_cmake(CStandardNoDefault)
endif()
if(CMAKE_CXX_STANDARD_DEFAULT)
run_cmake(CxxStandard)
-else()
+elseif(DEFINED CMAKE_CXX_STANDARD_DEFAULT)
run_cmake(CxxStandardNoDefault)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
-----------------------------------------------------------------------
Summary of changes:
Tests/RunCMake/CMakeLists.txt | 21 +++++++++++++--------
Tests/RunCMake/try_compile/CxxStandardGNU.cxx | 3 ++-
Tests/RunCMake/try_compile/RunCMakeTest.cmake | 4 ++--
3 files changed, 17 insertions(+), 11 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list