[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3837-g4a28dd0

Rolf Eike Beer eike at sf-mail.de
Sat Aug 10 14:17:46 EDT 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  4a28dd0c7054e31377755437f5d396633029fe2a (commit)
       via  3085efcc32ddf076a2f684c2a254d4c6ca9aba54 (commit)
       via  e0305378fce25a8c3ddec301a18f4ca59e633478 (commit)
       via  96250fd2d970c9223ca58f5570ddacec8bc77399 (commit)
      from  c32a4f4658a3dfbe8afc5e5fa50064a33058cc80 (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=4a28dd0c7054e31377755437f5d396633029fe2a
commit 4a28dd0c7054e31377755437f5d396633029fe2a
Merge: c32a4f4 3085efc
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sat Aug 10 14:17:45 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Aug 10 14:17:45 2013 -0400

    Merge topic 'cxx11' into next
    
    3085efc CXXFeatures: wrap test-and-set for compiler flag in function
    e030537 CXXFeatures: add flags used by Intel compiler on Windows
    96250fd CXXFeatures: update list of expected features


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3085efcc32ddf076a2f684c2a254d4c6ca9aba54
commit 3085efcc32ddf076a2f684c2a254d4c6ca9aba54
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sat Aug 10 20:17:17 2013 +0200
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Sat Aug 10 20:17:17 2013 +0200

    CXXFeatures: wrap test-and-set for compiler flag in function

diff --git a/Modules/FindCXXFeatures.cmake b/Modules/FindCXXFeatures.cmake
index e7a459c..294e19a 100644
--- a/Modules/FindCXXFeatures.cmake
+++ b/Modules/FindCXXFeatures.cmake
@@ -45,35 +45,30 @@ endif ()
 ### Check for needed compiler flags
 #
 include(${CMAKE_CURRENT_LIST_DIR}/CheckCXXCompilerFlag.cmake)
-if (CMAKE_CXX_COMPILER_ID MATCHES "XL")
-    check_cxx_compiler_flag("-qlanglvl=extended0x" _HAS_CXX0X_FLAG)
-    if (_HAS_CXX0X_FLAG)
-        set(CXX11_COMPILER_FLAGS "-qlanglvl=extended0x")
+
+function(test_set_flag FLAG NAME)
+    check_cxx_compiler_flag("${FLAG}" _HAS_${NAME}_FLAG)
+    if (_HAS_${NAME}_FLAG)
+        set(CXX11_COMPILER_FLAGS "${FLAG}" PARENT_SCOPE)
     endif ()
+endfunction()
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "XL")
+    test_set_flag("-qlanglvl=extended0x" CXX0x)
 elseif (CMAKE_CXX_COMPILER_ID MATCHES "(Borland|Watcom)")
     # No C++11 flag for those compilers, but check_cxx_compiler_flag()
     # can't detect because they either will not always complain (Borland)
     # or will hang (Watcom).
 elseif (WIN32)
     # The Intel compiler on Windows may use these flags.
-    check_cxx_compiler_flag("/Qstd=c++11" _HAS_CXX11_FLAG)
-    if (_HAS_CXX11_FLAG)
-        set(CXX11_COMPILER_FLAGS "/Qstd=c++11")
-    else ()
-        check_cxx_compiler_flag("/Qstd=c++0x" _HAS_CXX0X_FLAG)
-        if (_HAS_CXX0X_FLAG)
-            set(CXX11_COMPILER_FLAGS "/Qstd=c++0x")
-        endif ()
+    test_set_flag("/Qstd=c++11" CXX11)
+    if (NOT CXX11_COMPILER_FLAGS)
+        test_set_flag("/Qstd=c++0x" CXX0x)
     endif ()
 else ()
-    check_cxx_compiler_flag("-std=c++11" _HAS_CXX11_FLAG)
-    if (_HAS_CXX11_FLAG)
-        set(CXX11_COMPILER_FLAGS "-std=c++11")
-    else ()
-        check_cxx_compiler_flag("-std=c++0x" _HAS_CXX0X_FLAG)
-        if (_HAS_CXX0X_FLAG)
-            set(CXX11_COMPILER_FLAGS "-std=c++0x")
-        endif ()
+    test_set_flag("-std=c++11" CXX11)
+    if (NOT CXX11_COMPILER_FLAGS)
+        test_set_flag("-std=c++0x" CXX0x)
     endif ()
 endif ()
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0305378fce25a8c3ddec301a18f4ca59e633478
commit e0305378fce25a8c3ddec301a18f4ca59e633478
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sat Aug 10 20:08:08 2013 +0200
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Sat Aug 10 20:08:08 2013 +0200

    CXXFeatures: add flags used by Intel compiler on Windows

diff --git a/Modules/FindCXXFeatures.cmake b/Modules/FindCXXFeatures.cmake
index 5599998..e7a459c 100644
--- a/Modules/FindCXXFeatures.cmake
+++ b/Modules/FindCXXFeatures.cmake
@@ -54,6 +54,17 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "(Borland|Watcom)")
     # No C++11 flag for those compilers, but check_cxx_compiler_flag()
     # can't detect because they either will not always complain (Borland)
     # or will hang (Watcom).
+elseif (WIN32)
+    # The Intel compiler on Windows may use these flags.
+    check_cxx_compiler_flag("/Qstd=c++11" _HAS_CXX11_FLAG)
+    if (_HAS_CXX11_FLAG)
+        set(CXX11_COMPILER_FLAGS "/Qstd=c++11")
+    else ()
+        check_cxx_compiler_flag("/Qstd=c++0x" _HAS_CXX0X_FLAG)
+        if (_HAS_CXX0X_FLAG)
+            set(CXX11_COMPILER_FLAGS "/Qstd=c++0x")
+        endif ()
+    endif ()
 else ()
     check_cxx_compiler_flag("-std=c++11" _HAS_CXX11_FLAG)
     if (_HAS_CXX11_FLAG)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=96250fd2d970c9223ca58f5570ddacec8bc77399
commit 96250fd2d970c9223ca58f5570ddacec8bc77399
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sat Aug 10 20:03:17 2013 +0200
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Sat Aug 10 20:03:17 2013 +0200

    CXXFeatures: update list of expected features
    
    Also fix a warning about an unreferenced variable in the testcase program.

diff --git a/Tests/Module/FindCXXFeatures/CMakeLists.txt b/Tests/Module/FindCXXFeatures/CMakeLists.txt
index f6e14f3..2d6f3dc 100644
--- a/Tests/Module/FindCXXFeatures/CMakeLists.txt
+++ b/Tests/Module/FindCXXFeatures/CMakeLists.txt
@@ -165,6 +165,27 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
              CXXFeatures_delegating_constructors_FOUND
              CXXFeatures_initializer_list_FOUND)
     endif ()
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "Watcom")
+    # values found by looking on the test output, may be present much longer
+    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.70)
+        list(APPEND _expected_features
+             CXXFeatures_func_identifier_FOUND
+             CXXFeatures_long_long_FOUND)
+    endif ()
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "MIPSpro")
+    # values found by looking on the test output, may be present much longer
+    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.4.4)
+        list(APPEND _expected_features
+             CXXFeatures_func_identifier_FOUND
+             CXXFeatures_long_long_FOUND)
+    endif ()
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "HP")
+    # values found by looking on the test output, may be present much longer
+    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.20)
+        list(APPEND _expected_features
+             CXXFeatures_func_identifier_FOUND
+             CXXFeatures_long_long_FOUND)
+    endif ()
 else ()
     message(STATUS "CTEST_FULL_OUTPUT")
     message(WARNING "Your C++ compiler configuration is not in the list of known configurations")
diff --git a/Tests/Module/FindCXXFeatures/cxxfeatures.cxx b/Tests/Module/FindCXXFeatures/cxxfeatures.cxx
index d0a50e1..865012e 100644
--- a/Tests/Module/FindCXXFeatures/cxxfeatures.cxx
+++ b/Tests/Module/FindCXXFeatures/cxxfeatures.cxx
@@ -19,7 +19,7 @@ struct thing {
 int main()
 {
 #if defined (CXXFEATURES_NULLPTR_FOUND)
-    void *nix = nullptr;
+    nullptr_t *nix = nullptr;
 #else /* CXXFEATURES_NULLPTR_FOUND */
     void *nix = 0;
 #endif /* CXXFEATURES_NULLPTR_FOUND */
@@ -53,5 +53,5 @@ int main()
 #endif /* CXXFEATURES_LONG_LONG_FOUND */
 #endif /* CXXFEATURES_SIZEOF_MEMBER_FOUND */
 
-    return 0;
+    return !!nix;
 }

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

Summary of changes:
 Modules/FindCXXFeatures.cmake                |   30 +++++++++++++++----------
 Tests/Module/FindCXXFeatures/CMakeLists.txt  |   21 ++++++++++++++++++
 Tests/Module/FindCXXFeatures/cxxfeatures.cxx |    4 +-
 3 files changed, 41 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list