diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 31 |
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 |