summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-07-06 13:54:36 (GMT)
committerBrad King <brad.king@kitware.com>2010-07-06 13:54:36 (GMT)
commit3ef273c568614e4790f8a7cf5b2521da2277cb4c (patch)
tree7584254beeaa58be04eaafb77bf8c77d9f96313d /CMakeLists.txt
parent696a0af22022c6d629d67fcff2c7e779c917e187 (diff)
downloadCMake-3ef273c568614e4790f8a7cf5b2521da2277cb4c.zip
CMake-3ef273c568614e4790f8a7cf5b2521da2277cb4c.tar.gz
CMake-3ef273c568614e4790f8a7cf5b2521da2277cb4c.tar.bz2
Poison GCC 3.3 on OpenBSD a bit later
Move lines from commit 696a0af (Disable gcc 33 on OpenBSD because it crashes CPack by default, 2010-06-25) further down in CMakeLists.txt so that CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS applies. This fixes the code for building with CMake 2.4.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt31
1 files changed, 15 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8b41cc3..cbce95a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,21 +17,6 @@ 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)
@@ -345,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