Fatal errors in CMake files (such as unsupported system) now abort the configuration step

This commit is contained in:
Laurent Gomila 2011-12-29 16:20:21 +01:00
parent effe6d4cec
commit c67148eaf2

View File

@ -14,12 +14,12 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
EXEC_PROGRAM(/usr/bin/sw_vers ARGS -productVersion OUTPUT_VARIABLE MACOSX_VERSION_RAW)
STRING(REGEX REPLACE "10\\.([0-9]).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}")
if(${MACOSX_VERSION} LESS 5)
message(WARNING "Unsupported version of OS X : ${MACOSX_VERSION_RAW}")
message(FATAL_ERROR "Unsupported version of OS X : ${MACOSX_VERSION_RAW}")
return()
endif()
else()
message(WARNING "Unsupported operating system")
message(FATAL_ERROR "Unsupported operating system")
return()
endif()
@ -32,7 +32,7 @@ if(${SIZEOF_VOID_PTR} MATCHES "^4$")
elseif(${SIZEOF_VOID_PTR} MATCHES "^8$")
set(ARCH_64BITS 1)
else()
message(WARNING "Unsupported architecture")
message(FATAL_ERROR "Unsupported architecture")
return()
endif()
@ -59,7 +59,7 @@ elseif(MSVC)
set(MSVC_VERSION 2010)
endif()
else()
message(WARNING "Unsupported compiler")
message(FATAL_ERROR "Unsupported compiler")
return()
endif()