[Cmake-commits] CMake branch, next, updated. v2.8.5-1480-g61ef369
Stephen Kelly
steveire at gmail.com
Wed Aug 10 09:21:47 EDT 2011
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 61ef369265fbbad328db05c9efb82591ff35dd7a (commit)
via 61726f867eef69bea9237fb0b20c29b1ab3e35c1 (commit)
from 7712433fb55845b723fd39fbf48eb5f282f1901f (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=61ef369265fbbad328db05c9efb82591ff35dd7a
commit 61ef369265fbbad328db05c9efb82591ff35dd7a
Merge: 7712433 61726f8
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Aug 10 09:21:45 2011 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 10 09:21:45 2011 -0400
Merge topic 'generate_export_header' into next
61726f8 Only run the failure tests with gcc >= 4.2
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61726f867eef69bea9237fb0b20c29b1ab3e35c1
commit 61726f867eef69bea9237fb0b20c29b1ab3e35c1
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Aug 10 15:16:28 2011 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Aug 10 15:17:01 2011 +0200
Only run the failure tests with gcc >= 4.2
diff --git a/Tests/Module/GenerateExportHeader/CMakeLists.txt b/Tests/Module/GenerateExportHeader/CMakeLists.txt
index 140b399..6374087 100644
--- a/Tests/Module/GenerateExportHeader/CMakeLists.txt
+++ b/Tests/Module/GenerateExportHeader/CMakeLists.txt
@@ -74,9 +74,24 @@ macro(_do_build Include Library LibrarySource Source)
)
endmacro()
+if (CMAKE_COMPILER_IS_GNUCXX)
+ exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info)
+ string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
+ # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
+ # patch level, handle this here:
+ if(NOT _gcc_version)
+ string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${_gcc_version_info}")
+ endif()
+
+ if(${_gcc_version} VERSION_LESS "4.2")
+ set(GCC_IS_LESS_THAN_4_2 TRUE)
+ message(WARNING "GCC version older than 4.2. Actual version: ${_gcc_version}")
+ endif()
+endif()
+
macro(build_fail Include Library LibrarySource Source Message)
_do_build(${Include} ${Library} ${LibrarySource} "${Source}")
- if((USE_COMPILER_HIDDEN_VISIBILITY AND COMPILER_HAS_HIDDEN_VISIBILITY) OR WIN32 OR (${CMAKE_CXX_COMPILER_ID} MATCHES Clang))
+ if(NOT GCC_IS_LESS_THAN_4_2 AND (USE_COMPILER_HIDDEN_VISIBILITY AND COMPILER_HAS_HIDDEN_VISIBILITY) OR WIN32 OR (${CMAKE_CXX_COMPILER_ID} MATCHES Clang))
test_fail(Result ${Message})
else()
test_pass(Result ${Message})
-----------------------------------------------------------------------
Summary of changes:
Tests/Module/GenerateExportHeader/CMakeLists.txt | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list