From c67148eaf23c35628088238dc269060a44504035 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Thu, 29 Dec 2011 16:20:21 +0100 Subject: [PATCH] Fatal errors in CMake files (such as unsupported system) now abort the configuration step --- cmake/Config.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/Config.cmake b/cmake/Config.cmake index 9b6c1c3f..4349945d 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -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()