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.
This commit is contained in:
parent
696a0af220
commit
3ef273c568
|
@ -17,21 +17,6 @@ ENDIF(COMMAND CMAKE_POLICY)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
|
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.
|
# Allow empty endif() and such with CMake 2.4.
|
||||||
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1)
|
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1)
|
||||||
|
|
||||||
|
@ -345,7 +330,21 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
||||||
ENDIF(BUILD_CursesDialog)
|
ENDIF(BUILD_CursesDialog)
|
||||||
ENDMACRO (CMAKE_BUILD_UTILITIES)
|
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
|
# The main section of the CMakeLists file
|
||||||
|
|
Loading…
Reference in New Issue