summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-07-13 18:46:23 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2010-07-13 18:46:23 (GMT)
commita3c2c459b93c44cbc315f11293025ee9013918b5 (patch)
tree89faac02c4606175d2bf2bc5cb4ffc876425fa7c /CMakeLists.txt
parente562a938ca2d3efa39eabdeaa918e410328e4259 (diff)
parent3ef273c568614e4790f8a7cf5b2521da2277cb4c (diff)
downloadCMake-a3c2c459b93c44cbc315f11293025ee9013918b5.zip
CMake-a3c2c459b93c44cbc315f11293025ee9013918b5.tar.gz
CMake-a3c2c459b93c44cbc315f11293025ee9013918b5.tar.bz2
Merge topic 'disable_gcc33_onfree_bsd'
3ef273c Poison GCC 3.3 on OpenBSD a bit later 696a0af Disable gcc 33 on OpenBSD because it crashes CPack by default.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d77c377..fc1f4a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -330,7 +330,21 @@ MACRO (CMAKE_BUILD_UTILITIES)
ENDIF(BUILD_CursesDialog)
ENDMACRO (CMAKE_BUILD_UTILITIES)
-
+#-----------------------------------------------------------------------
+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()
#-----------------------------------------------------------------------
# The main section of the CMakeLists file