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.
This commit is contained in:
parent
d7770578d1
commit
696a0af220
|
@ -17,6 +17,21 @@ 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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue