Commit 212b6f65 by Patrick Steinhardt

cmake: fix various misuses of MESSAGE()

The MESSAGE() function expects as first argument the message type, e.g.
STATUS or FATAL_ERROR. In some places, we were misusing this to either
not provide any type, which would then erroneously print the message to
standard error, or to use FATAL instead of FATAL_ERROR.

Fix all of these instances. Also, remove some MESSAGE invocations that
are obvious leftovers from debugging the build system.
parent e77fdf87
...@@ -10,14 +10,14 @@ FIND_PATH(COREFOUNDATION_INCLUDE_DIR NAMES CoreFoundation.h) ...@@ -10,14 +10,14 @@ FIND_PATH(COREFOUNDATION_INCLUDE_DIR NAMES CoreFoundation.h)
FIND_LIBRARY(COREFOUNDATION_LIBRARIES NAMES CoreFoundation) FIND_LIBRARY(COREFOUNDATION_LIBRARIES NAMES CoreFoundation)
IF (COREFOUNDATION_INCLUDE_DIR AND COREFOUNDATION_LIBRARIES) IF (COREFOUNDATION_INCLUDE_DIR AND COREFOUNDATION_LIBRARIES)
IF (NOT CoreFoundation_FIND_QUIETLY) IF (NOT CoreFoundation_FIND_QUIETLY)
MESSAGE("-- Found CoreFoundation ${COREFOUNDATION_LIBRARIES}") MESSAGE(STATUS "Found CoreFoundation ${COREFOUNDATION_LIBRARIES}")
ENDIF() ENDIF()
SET(COREFOUNDATION_FOUND TRUE) SET(COREFOUNDATION_FOUND TRUE)
SET(COREFOUNDATION_LDFLAGS "-framework CoreFoundation") SET(COREFOUNDATION_LDFLAGS "-framework CoreFoundation")
ENDIF () ENDIF ()
IF (CoreFoundation_FIND_REQUIRED AND NOT COREFOUNDATION_FOUND) IF (CoreFoundation_FIND_REQUIRED AND NOT COREFOUNDATION_FOUND)
MESSAGE(FATAL "-- CoreFoundation not found") MESSAGE(FATAL_ERROR "CoreFoundation not found")
ENDIF() ENDIF()
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
......
...@@ -11,7 +11,7 @@ FIND_PATH(SECURITY_INCLUDE_DIR NAMES Security/Security.h) ...@@ -11,7 +11,7 @@ FIND_PATH(SECURITY_INCLUDE_DIR NAMES Security/Security.h)
FIND_LIBRARY(SECURITY_LIBRARIES NAMES Security) FIND_LIBRARY(SECURITY_LIBRARIES NAMES Security)
IF (SECURITY_INCLUDE_DIR AND SECURITY_LIBRARIES) IF (SECURITY_INCLUDE_DIR AND SECURITY_LIBRARIES)
IF (NOT Security_FIND_QUIETLY) IF (NOT Security_FIND_QUIETLY)
MESSAGE("-- Found Security ${SECURITY_LIBRARIES}") MESSAGE(STATUS "Found Security ${SECURITY_LIBRARIES}")
ENDIF() ENDIF()
SET(SECURITY_FOUND TRUE) SET(SECURITY_FOUND TRUE)
SET(SECURITY_LDFLAGS "-framework Security") SET(SECURITY_LDFLAGS "-framework Security")
...@@ -19,7 +19,7 @@ IF (SECURITY_INCLUDE_DIR AND SECURITY_LIBRARIES) ...@@ -19,7 +19,7 @@ IF (SECURITY_INCLUDE_DIR AND SECURITY_LIBRARIES)
ENDIF () ENDIF ()
IF (Security_FIND_REQUIRED AND NOT SECURITY_FOUND) IF (Security_FIND_REQUIRED AND NOT SECURITY_FOUND)
MESSAGE(FATAL "-- Security not found") MESSAGE(FATAL_ERROR "Security not found")
ENDIF() ENDIF()
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
......
...@@ -14,7 +14,7 @@ IF (USE_HTTPS STREQUAL ON) ...@@ -14,7 +14,7 @@ IF (USE_HTTPS STREQUAL ON)
IF (SECURITY_HAS_SSLCREATECONTEXT) IF (SECURITY_HAS_SSLCREATECONTEXT)
SET(HTTPS_BACKEND "SecureTransport") SET(HTTPS_BACKEND "SecureTransport")
ELSE() ELSE()
MESSAGE("-- Security framework is too old, falling back to OpenSSL") MESSAGE(STATUS "Security framework is too old, falling back to OpenSSL")
SET(HTTPS_BACKEND "OpenSSL") SET(HTTPS_BACKEND "OpenSSL")
ENDIF() ENDIF()
ELSEIF (WINHTTP) ELSEIF (WINHTTP)
...@@ -67,7 +67,7 @@ IF(HTTPS_BACKEND) ...@@ -67,7 +67,7 @@ IF(HTTPS_BACKEND)
ENDIF() ENDIF()
IF(NOT CERT_LOCATION) IF(NOT CERT_LOCATION)
MESSAGE("Auto-detecting default certificates location") MESSAGE(STATUS "Auto-detecting default certificates location")
IF(CMAKE_SYSTEM_NAME MATCHES Darwin) IF(CMAKE_SYSTEM_NAME MATCHES Darwin)
# Check for an Homebrew installation # Check for an Homebrew installation
SET(OPENSSL_CMD "/usr/local/opt/openssl/bin/openssl") SET(OPENSSL_CMD "/usr/local/opt/openssl/bin/openssl")
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
IF(USE_SHA1 STREQUAL ON OR USE_SHA1 STREQUAL "CollisionDetection") IF(USE_SHA1 STREQUAL ON OR USE_SHA1 STREQUAL "CollisionDetection")
SET(SHA1_BACKEND "CollisionDetection") SET(SHA1_BACKEND "CollisionDetection")
ELSEIF(USE_SHA1 STREQUAL "HTTPS") ELSEIF(USE_SHA1 STREQUAL "HTTPS")
message("Checking HTTPS backend… ${HTTPS_BACKEND}") message(STATUS "Checking HTTPS backend… ${HTTPS_BACKEND}")
IF(HTTPS_BACKEND STREQUAL "SecureTransport") IF(HTTPS_BACKEND STREQUAL "SecureTransport")
SET(SHA1_BACKEND "CommonCrypto") SET(SHA1_BACKEND "CommonCrypto")
ELSEIF(HTTPS_BACKEND STREQUAL "WinHTTP") ELSEIF(HTTPS_BACKEND STREQUAL "WinHTTP")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment