[Cmake-commits] CMake branch, next, updated. v3.0.0-rc4-2922-gb5e37d2
Stephen Kelly
steveire at gmail.com
Wed May 7 06:19:36 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 b5e37d221eaf8fb315395de7611dcacb3ca1f157 (commit)
via d9b31156bd8cec7904b5ee8a66add36598d28ac6 (commit)
from 07f508fded559717d48baad959aa12c9492e6372 (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=b5e37d221eaf8fb315395de7611dcacb3ca1f157
commit b5e37d221eaf8fb315395de7611dcacb3ca1f157
Merge: 07f508f d9b3115
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed May 7 06:19:36 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 7 06:19:36 2014 -0400
Merge topic 'GNU-4.7-features' into next
d9b31156 Features: Record for GNU 4.7.
diff --cc Modules/Compiler/GNU-CXX.cmake
index d324985,d0de14c..1ecdad2
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@@ -29,13 -27,14 +29,13 @@@ set(CMAKE_CXX_STANDARD_DEFAULT 98
macro(cmake_record_cxx_compile_features)
macro(_get_gcc_features std_version list)
record_compiler_features(CXX "-std=${std_version}" ${list})
- if (NOT _result EQUAL 0)
- return()
- endif()
endmacro()
- if (UNIX AND NOT APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+ if (UNIX AND NOT APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
_get_gcc_features(c++11 CMAKE_CXX11_COMPILE_FEATURES)
- _get_gcc_features(c++98 CMAKE_CXX98_COMPILE_FEATURES)
+ if (_result EQUAL 0)
+ _get_gcc_features(c++98 CMAKE_CXX98_COMPILE_FEATURES)
+ endif()
else()
set(_result 0)
endif()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9b31156bd8cec7904b5ee8a66add36598d28ac6
commit d9b31156bd8cec7904b5ee8a66add36598d28ac6
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Apr 6 13:00:17 2014 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed May 7 12:19:02 2014 +0200
Features: Record for GNU 4.7.
Update the CompileFeatures test to verify that unsupported features
do not work.
diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index fe0ff0b..b19ee49 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -1,7 +1,7 @@
# Reference: http://gcc.gnu.org/projects/cxx0x.html
-set(_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408")
+set(_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 407")
# Introduced in GCC 4.8.1
set(GNU481_CXX11 "((__GNUC__ * 100 + __GNUC_MINOR__) > 408 || __GNUC_PATCHLEVEL__ >= 1) && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${GNU481_CXX11}")
@@ -12,8 +12,7 @@ set(_cmake_feature_test_cxx_alignof "${GNU48_CXX11}")
set(_cmake_feature_test_cxx_attributes "${GNU48_CXX11}")
set(_cmake_feature_test_cxx_inheriting_constructors "${GNU48_CXX11}")
set(_cmake_feature_test_cxx_thread_local "${GNU48_CXX11}")
-# TODO: Should be supported by GNU 4.7
-set(GNU47_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
+set(GNU47_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_alias_templates "${GNU47_CXX11}")
set(_cmake_feature_test_cxx_delegating_constructors "${GNU47_CXX11}")
set(_cmake_feature_test_cxx_extended_friend_declarations "${GNU47_CXX11}")
diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake
index 6ec3958..d0de14c 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -32,7 +32,7 @@ macro(cmake_record_cxx_compile_features)
endif()
endmacro()
- if (UNIX AND NOT APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+ if (UNIX AND NOT APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
_get_gcc_features(c++11 CMAKE_CXX11_COMPILE_FEATURES)
_get_gcc_features(c++98 CMAKE_CXX98_COMPILE_FEATURES)
else()
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 501138d..fbe6687 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -18,7 +18,7 @@ macro(run_test feature)
PROPERTY COMPILE_FEATURES "${feature}"
)
else()
- message("Not supported: ${feature}")
+ list(APPEND non_features ${feature})
endif()
endmacro()
@@ -27,6 +27,17 @@ foreach(feature ${features})
run_test(${feature})
endforeach()
+if (CMAKE_CXX_COMPILE_FEATURES)
+ include(CheckCXXSourceCompiles)
+ foreach(feature ${non_features})
+ check_cxx_source_compiles("#include \"${CMAKE_CURRENT_SOURCE_DIR}/${feature}.cpp\"\nint main() { return 0; }\n" ${feature}_works)
+ 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.")
+ endif()
+ endforeach()
+endif()
+
add_executable(CompileFeatures main.cpp)
set_property(TARGET CompileFeatures
PROPERTY COMPILE_FEATURES "cxx_auto_type"
-----------------------------------------------------------------------
Summary of changes:
Modules/Compiler/GNU-CXX-FeatureTests.cmake | 5 ++---
Modules/Compiler/GNU-CXX.cmake | 2 +-
Tests/CompileFeatures/CMakeLists.txt | 13 ++++++++++++-
3 files changed, 15 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list