summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2010-06-25 16:54:16 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2010-06-25 16:54:16 (GMT)
commit696a0af22022c6d629d67fcff2c7e779c917e187 (patch)
tree9de56888520c2bc50d0adb842ba5c77d04084452
parentd7770578d124bad230690f5c5963ee5517279acc (diff)
downloadCMake-696a0af22022c6d629d67fcff2c7e779c917e187.zip
CMake-696a0af22022c6d629d67fcff2c7e779c917e187.tar.gz
CMake-696a0af22022c6d629d67fcff2c7e779c917e187.tar.bz2
Disable gcc 33 on OpenBSD because it crashes CPack by default.
Make sure no one tries to use gcc 33 based tools to build CMake. This is because a cpack test failed with a crash. The crash seems to be caused by the stack checking code on by default in OpenBSD. The crash is in some stl code. The problem is fixed with newer gcc compilers on OpenBSD.
-rw-r--r--CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bd90163..8b41cc3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,21 @@ ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
+IF(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
+ EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER}
+ ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
+ OUTPUT_VARIABLE _GXX_VERSION
+ )
+ STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
+ _GXX_VERSION_SHORT ${_GXX_VERSION})
+ IF(_GXX_VERSION_SHORT EQUAL 33)
+ MESSAGE(FATAL_ERROR
+ "GXX 3.3 on OpenBSD is known to cause CPack to Crash.\n"
+ "Please use GXX 4.2 or greater to build CMake on OpenBSD\n"
+ "${CMAKE_CXX_COMPILER} version is: ${_GXX_VERSION}")
+ ENDIF()
+ENDIF()
+
# Allow empty endif() and such with CMake 2.4.
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1)