[Cmake-commits] CMake branch, next, updated. v2.8.7-2050-g0a74992

Rolf Eike Beer eike at sf-mail.de
Tue Jan 10 13:29:21 EST 2012


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  0a749924cd46219f79af554d57001bafce3a6f61 (commit)
       via  a55940cccd379bf3f7feaf562e082242d84d6458 (commit)
      from  231a2b784fe71b6a42d574c7f867ff53230acd43 (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=0a749924cd46219f79af554d57001bafce3a6f61
commit 0a749924cd46219f79af554d57001bafce3a6f61
Merge: 231a2b7 a55940c
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Jan 10 13:28:51 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 10 13:28:51 2012 -0500

    Merge topic 'test-symbol-exists' into next
    
    a55940c CheckCXXSymbolExists: catch compilers where errno is not in namespace std


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a55940cccd379bf3f7feaf562e082242d84d6458
commit a55940cccd379bf3f7feaf562e082242d84d6458
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Jan 10 19:23:56 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Tue Jan 10 19:23:56 2012 +0100

    CheckCXXSymbolExists: catch compilers where errno is not in namespace std
    
    Looks like MIPSpro on IRIX and MSVC6 get this wrong.

diff --git a/Tests/Module/CheckCXXSymbolExists/CMakeLists.txt b/Tests/Module/CheckCXXSymbolExists/CMakeLists.txt
index c55c05d..d69e167 100644
--- a/Tests/Module/CheckCXXSymbolExists/CMakeLists.txt
+++ b/Tests/Module/CheckCXXSymbolExists/CMakeLists.txt
@@ -65,6 +65,14 @@ IF (CMAKE_COMPILER_IS_GNUCXX)
   ENDIF (CSE_RESULT_O3)
 ENDIF (CMAKE_COMPILER_IS_GNUCXX)
 
+IF(CMAKE_CXX_COMPILER_ID IS "MIPSpro")
+  SET(NO_STD_NAMESPACE_FOR_ERRNO TRUE)
+ELSEIF(MSVC_VERSION AND NOT MSVC_VERSION VERSION_GREATER 1200)
+  SET(NO_STD_NAMESPACE_FOR_ERRNO TRUE)
+ELSE()
+  SET(NO_STD_NAMESPACE_FOR_ERRNO FALSE)
+ENDIF()
+
 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/errno.cxx.in" "${CMAKE_CURRENT_BINARY_DIR}/errno.cxx" @ONLY)
 
 add_executable(CheckCXXSymbolExists "${CMAKE_CURRENT_BINARY_DIR}/errno.cxx")
diff --git a/Tests/Module/CheckCXXSymbolExists/errno.cxx.in b/Tests/Module/CheckCXXSymbolExists/errno.cxx.in
index 81b51aa..bd955a9 100644
--- a/Tests/Module/CheckCXXSymbolExists/errno.cxx.in
+++ b/Tests/Module/CheckCXXSymbolExists/errno.cxx.in
@@ -10,7 +10,13 @@
 // This is required for the Borland compiler, but should be right for all
 // others, too. To avoid breaking older compilers we don't simply use
 // std::errno.
+
+#cmakedefine NO_STD_NAMESPACE_FOR_ERRNO
+
+#if !defined(NO_STD_NAMESPACE_FOR_ERRNO)
+// but of course there are compilers where this doesn't work
 using namespace std;
+#endif
 
 int main()
 {

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

Summary of changes:
 Tests/Module/CheckCXXSymbolExists/CMakeLists.txt |    8 ++++++++
 Tests/Module/CheckCXXSymbolExists/errno.cxx.in   |    6 ++++++
 2 files changed, 14 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list