Skip to content

Commit 212b6f6

Browse files
committed
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.
1 parent e77fdf8 commit 212b6f6

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

cmake/Modules/FindCoreFoundation.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ FIND_PATH(COREFOUNDATION_INCLUDE_DIR NAMES CoreFoundation.h)
1010
FIND_LIBRARY(COREFOUNDATION_LIBRARIES NAMES CoreFoundation)
1111
IF (COREFOUNDATION_INCLUDE_DIR AND COREFOUNDATION_LIBRARIES)
1212
IF (NOT CoreFoundation_FIND_QUIETLY)
13-
MESSAGE("-- Found CoreFoundation ${COREFOUNDATION_LIBRARIES}")
13+
MESSAGE(STATUS "Found CoreFoundation ${COREFOUNDATION_LIBRARIES}")
1414
ENDIF()
1515
SET(COREFOUNDATION_FOUND TRUE)
1616
SET(COREFOUNDATION_LDFLAGS "-framework CoreFoundation")
1717
ENDIF ()
1818

1919
IF (CoreFoundation_FIND_REQUIRED AND NOT COREFOUNDATION_FOUND)
20-
MESSAGE(FATAL "-- CoreFoundation not found")
20+
MESSAGE(FATAL_ERROR "CoreFoundation not found")
2121
ENDIF()
2222

2323
MARK_AS_ADVANCED(

cmake/Modules/FindSecurity.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ FIND_PATH(SECURITY_INCLUDE_DIR NAMES Security/Security.h)
1111
FIND_LIBRARY(SECURITY_LIBRARIES NAMES Security)
1212
IF (SECURITY_INCLUDE_DIR AND SECURITY_LIBRARIES)
1313
IF (NOT Security_FIND_QUIETLY)
14-
MESSAGE("-- Found Security ${SECURITY_LIBRARIES}")
14+
MESSAGE(STATUS "Found Security ${SECURITY_LIBRARIES}")
1515
ENDIF()
1616
SET(SECURITY_FOUND TRUE)
1717
SET(SECURITY_LDFLAGS "-framework Security")
1818
CHECK_LIBRARY_EXISTS("${SECURITY_LIBRARIES}" SSLCreateContext "Security/SecureTransport.h" SECURITY_HAS_SSLCREATECONTEXT)
1919
ENDIF ()
2020

2121
IF (Security_FIND_REQUIRED AND NOT SECURITY_FOUND)
22-
MESSAGE(FATAL "-- Security not found")
22+
MESSAGE(FATAL_ERROR "Security not found")
2323
ENDIF()
2424

2525
MARK_AS_ADVANCED(

cmake/Modules/SelectHTTPSBackend.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ IF (USE_HTTPS STREQUAL ON)
1414
IF (SECURITY_HAS_SSLCREATECONTEXT)
1515
SET(HTTPS_BACKEND "SecureTransport")
1616
ELSE()
17-
MESSAGE("-- Security framework is too old, falling back to OpenSSL")
17+
MESSAGE(STATUS "Security framework is too old, falling back to OpenSSL")
1818
SET(HTTPS_BACKEND "OpenSSL")
1919
ENDIF()
2020
ELSEIF (WINHTTP)
@@ -67,7 +67,7 @@ IF(HTTPS_BACKEND)
6767
ENDIF()
6868

6969
IF(NOT CERT_LOCATION)
70-
MESSAGE("Auto-detecting default certificates location")
70+
MESSAGE(STATUS "Auto-detecting default certificates location")
7171
IF(CMAKE_SYSTEM_NAME MATCHES Darwin)
7272
# Check for an Homebrew installation
7373
SET(OPENSSL_CMD "/usr/local/opt/openssl/bin/openssl")

cmake/Modules/SelectHashes.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
IF(USE_SHA1 STREQUAL ON OR USE_SHA1 STREQUAL "CollisionDetection")
66
SET(SHA1_BACKEND "CollisionDetection")
77
ELSEIF(USE_SHA1 STREQUAL "HTTPS")
8-
message("Checking HTTPS backend… ${HTTPS_BACKEND}")
8+
message(STATUS "Checking HTTPS backend… ${HTTPS_BACKEND}")
99
IF(HTTPS_BACKEND STREQUAL "SecureTransport")
1010
SET(SHA1_BACKEND "CommonCrypto")
1111
ELSEIF(HTTPS_BACKEND STREQUAL "WinHTTP")

0 commit comments

Comments
 (0)