diff options
50 files changed, 213 insertions, 167 deletions
diff --git a/Modules/CMakeDetermineCompileFeatures.cmake b/Modules/CMakeDetermineCompileFeatures.cmake index 01a81a1..6adebae 100644 --- a/Modules/CMakeDetermineCompileFeatures.cmake +++ b/Modules/CMakeDetermineCompileFeatures.cmake @@ -5,7 +5,7 @@ function(cmake_determine_compile_features lang) if(lang STREQUAL C AND COMMAND cmake_record_c_compile_features) - message(STATUS "Detecting ${lang} compile features") + message(CHECK_START "Detecting ${lang} compile features") set(CMAKE_C90_COMPILE_FEATURES) set(CMAKE_C99_COMPILE_FEATURES) @@ -16,7 +16,7 @@ function(cmake_determine_compile_features lang) cmake_record_c_compile_features() if(NOT _result EQUAL 0) - message(STATUS "Detecting ${lang} compile features - failed") + message(CHECK_FAIL "failed") return() endif() @@ -40,10 +40,10 @@ function(cmake_determine_compile_features lang) set(CMAKE_C99_COMPILE_FEATURES ${CMAKE_C99_COMPILE_FEATURES} PARENT_SCOPE) set(CMAKE_C11_COMPILE_FEATURES ${CMAKE_C11_COMPILE_FEATURES} PARENT_SCOPE) - message(STATUS "Detecting ${lang} compile features - done") + message(CHECK_PASS "done") elseif(lang STREQUAL CXX AND COMMAND cmake_record_cxx_compile_features) - message(STATUS "Detecting ${lang} compile features") + message(CHECK_START "Detecting ${lang} compile features") set(CMAKE_CXX98_COMPILE_FEATURES) set(CMAKE_CXX11_COMPILE_FEATURES) @@ -56,7 +56,7 @@ function(cmake_determine_compile_features lang) cmake_record_cxx_compile_features() if(NOT _result EQUAL 0) - message(STATUS "Detecting ${lang} compile features - failed") + message(CHECK_FAIL "failed") return() endif() @@ -90,7 +90,7 @@ function(cmake_determine_compile_features lang) set(CMAKE_CXX17_COMPILE_FEATURES ${CMAKE_CXX17_COMPILE_FEATURES} PARENT_SCOPE) set(CMAKE_CXX20_COMPILE_FEATURES ${CMAKE_CXX20_COMPILE_FEATURES} PARENT_SCOPE) - message(STATUS "Detecting ${lang} compile features - done") + message(CHECK_PASS "done") endif() endfunction() diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake index 06f3ba2..c5611b5 100644 --- a/Modules/CMakeDetermineCompilerABI.cmake +++ b/Modules/CMakeDetermineCompilerABI.cmake @@ -12,7 +12,7 @@ include(CMakeTestCompilerCommon) function(CMAKE_DETERMINE_COMPILER_ABI lang src) if(NOT DEFINED CMAKE_${lang}_ABI_COMPILED) - message(STATUS "Detecting ${lang} compiler ABI info") + message(CHECK_START "Detecting ${lang} compiler ABI info") # Compile the ABI identification source. set(BIN "${CMAKE_PLATFORM_INFO_DIR}/CMakeDetermineCompilerABI_${lang}.bin") @@ -66,7 +66,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) # Load the resulting information strings. if(CMAKE_${lang}_ABI_COMPILED AND NOT _copy_error) - message(STATUS "Detecting ${lang} compiler ABI info - done") + message(CHECK_PASS "done") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n") file(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 2 REGEX "INFO:[A-Za-z0-9_]+\\[[^]]*\\]") @@ -124,8 +124,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) # a try-compile if("${lang}" MATCHES "Fortran" AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio") - set(_desc "Determine Intel Fortran Compiler Implicit Link Path") - message(STATUS "${_desc}") + message(CHECK_START "Determine Intel Fortran Compiler Implicit Link Path") # Build a sample project which reports symbols. try_compile(IFORT_LIB_PATH_COMPILED ${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath @@ -138,8 +137,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) "${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.txt" "${_output}") include(${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.cmake OPTIONAL) - set(_desc "Determine Intel Fortran Compiler Implicit Link Path -- done") - message(STATUS "${_desc}") + message(CHECK_PASS "done") endif() # Implicit link libraries cannot be used explicitly for multiple @@ -166,7 +164,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) endif() else() - message(STATUS "Detecting ${lang} compiler ABI info - failed") + message(CHECK_FAIL "failed") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n${_copy_error}\n\n") endif() diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake index 7bf6fde..eadea89 100644 --- a/Modules/CMakeTestCCompiler.cmake +++ b/Modules/CMakeTestCCompiler.cmake @@ -27,7 +27,7 @@ unset(CMAKE_C_COMPILER_WORKS CACHE) # is set and cmake stops processing commands and will not generate # any makefiles or projects. if(NOT CMAKE_C_COMPILER_WORKS) - PrintTestCompilerStatus("C" "") + PrintTestCompilerStatus("C") __TestCompiler_setTryCompileTargetType() file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c "#ifdef __cplusplus\n" @@ -52,7 +52,7 @@ if(NOT CMAKE_C_COMPILER_WORKS) endif() if(NOT CMAKE_C_COMPILER_WORKS) - PrintTestCompilerStatus("C" " -- broken") + PrintTestCompilerResult(CHECK_FAIL "broken") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the C compiler works failed with " "the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n") @@ -63,7 +63,7 @@ if(NOT CMAKE_C_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") else() if(C_TEST_WAS_RUN) - PrintTestCompilerStatus("C" " -- works") + PrintTestCompilerResult(CHECK_PASS "works") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the C compiler works passed with " "the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n") diff --git a/Modules/CMakeTestCSharpCompiler.cmake b/Modules/CMakeTestCSharpCompiler.cmake index 6715c30..1119a45 100644 --- a/Modules/CMakeTestCSharpCompiler.cmake +++ b/Modules/CMakeTestCSharpCompiler.cmake @@ -20,7 +20,9 @@ set(test_compile_file "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test # is set and cmake stops processing commands and will not generate # any makefiles or projects. if(NOT CMAKE_CSharp_COMPILER_WORKS) - PrintTestCompilerStatus("C#" "${CMAKE_CSharp_COMPILER}") + # Don't call PrintTestCompilerStatus() because the "C#" we want to pass + # as the LANG doesn't match with the variable name "CMAKE_CSharp_COMPILER" + message(CHECK_START "Check for working C# compiler: ${CMAKE_CSharp_COMPILER}") file(WRITE "${test_compile_file}" "namespace Test {" " public class CSharp {" @@ -38,7 +40,7 @@ if(NOT CMAKE_CSharp_COMPILER_WORKS) endif() if(NOT CMAKE_CSharp_COMPILER_WORKS) - PrintTestCompilerStatus("C#" "${CMAKE_CSharp_COMPILER} -- broken") + PrintTestCompilerResult(CHECK_FAIL "broken") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the C# compiler works failed with " "the following output:\n${__CMAKE_CSharp_COMPILER_OUTPUT}\n\n") @@ -49,7 +51,7 @@ if(NOT CMAKE_CSharp_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") else() if(CSharp_TEST_WAS_RUN) - PrintTestCompilerStatus("C#" "${CMAKE_CSharp_COMPILER} -- works") + PrintTestCompilerResult(CHECK_PASS "works") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the C# compiler works passed with " "the following output:\n${__CMAKE_CSharp_COMPILER_OUTPUT}\n\n") diff --git a/Modules/CMakeTestCUDACompiler.cmake b/Modules/CMakeTestCUDACompiler.cmake index f0454da..c145813 100644 --- a/Modules/CMakeTestCUDACompiler.cmake +++ b/Modules/CMakeTestCUDACompiler.cmake @@ -20,7 +20,7 @@ unset(CMAKE_CUDA_COMPILER_WORKS CACHE) # is set and cmake stops processing commands and will not generate # any makefiles or projects. if(NOT CMAKE_CUDA_COMPILER_WORKS) - PrintTestCompilerStatus("CUDA" "") + PrintTestCompilerStatus("CUDA") file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/main.cu "#ifndef __CUDACC__\n" "# error \"The CMAKE_CUDA_COMPILER is set to an invalid CUDA compiler\"\n" @@ -38,7 +38,7 @@ if(NOT CMAKE_CUDA_COMPILER_WORKS) endif() if(NOT CMAKE_CUDA_COMPILER_WORKS) - PrintTestCompilerStatus("CUDA" " -- broken") + PrintTestCompilerResult(CHECK_FAIL "broken") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the CUDA compiler works failed with " "the following output:\n${__CMAKE_CUDA_COMPILER_OUTPUT}\n\n") @@ -49,7 +49,7 @@ if(NOT CMAKE_CUDA_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") else() if(CUDA_TEST_WAS_RUN) - PrintTestCompilerStatus("CUDA" " -- works") + PrintTestCompilerResult(CHECK_PASS "works") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the CUDA compiler works passed with " "the following output:\n${__CMAKE_CUDA_COMPILER_OUTPUT}\n\n") diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake index 7e595b7..bd42153 100644 --- a/Modules/CMakeTestCXXCompiler.cmake +++ b/Modules/CMakeTestCXXCompiler.cmake @@ -27,7 +27,7 @@ unset(CMAKE_CXX_COMPILER_WORKS CACHE) # is set and cmake stops processing commands and will not generate # any makefiles or projects. if(NOT CMAKE_CXX_COMPILER_WORKS) - PrintTestCompilerStatus("CXX" "") + PrintTestCompilerStatus("CXX") __TestCompiler_setTryCompileTargetType() file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx "#ifndef __cplusplus\n" @@ -45,7 +45,7 @@ if(NOT CMAKE_CXX_COMPILER_WORKS) endif() if(NOT CMAKE_CXX_COMPILER_WORKS) - PrintTestCompilerStatus("CXX" " -- broken") + PrintTestCompilerResult(CHECK_FAIL "broken") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the CXX compiler works failed with " "the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n") @@ -56,7 +56,7 @@ if(NOT CMAKE_CXX_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") else() if(CXX_TEST_WAS_RUN) - PrintTestCompilerStatus("CXX" " -- works") + PrintTestCompilerResult(CHECK_PASS "works") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the CXX compiler works passed with " "the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n") diff --git a/Modules/CMakeTestCompilerCommon.cmake b/Modules/CMakeTestCompilerCommon.cmake index 6ee5175..da7c007 100644 --- a/Modules/CMakeTestCompilerCommon.cmake +++ b/Modules/CMakeTestCompilerCommon.cmake @@ -2,8 +2,15 @@ # file Copyright.txt or https://cmake.org/licensing for details. -function(PrintTestCompilerStatus LANG MSG) - message(STATUS "Check for working ${LANG} compiler: ${CMAKE_${LANG}_COMPILER}${MSG}") +function(PrintTestCompilerStatus LANG) + # ARGN shouldn't be needed now, but it is there to preserve backward + # compatibility in case this function is called from project code or + # custom toolchains (they shouldn't, but we can easily support it) + message(CHECK_START "Check for working ${LANG} compiler: ${CMAKE_${LANG}_COMPILER}${ARGN}") +endfunction() + +function(PrintTestCompilerResult TYPE MSG) + message(${TYPE} "${MSG}") endfunction() # if required set the target type if not already explicitly set diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake index e9860e9..7461f9c 100644 --- a/Modules/CMakeTestFortranCompiler.cmake +++ b/Modules/CMakeTestFortranCompiler.cmake @@ -21,7 +21,7 @@ unset(CMAKE_Fortran_COMPILER_WORKS CACHE) # is set and cmake stops processing commands and will not generate # any makefiles or projects. if(NOT CMAKE_Fortran_COMPILER_WORKS) - PrintTestCompilerStatus("Fortran" "") + PrintTestCompilerStatus("Fortran") file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f " PROGRAM TESTFortran PRINT *, 'Hello' @@ -37,7 +37,7 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS) endif() if(NOT CMAKE_Fortran_COMPILER_WORKS) - PrintTestCompilerStatus("Fortran" " -- broken") + PrintTestCompilerResult(CHECK_FAIL "broken") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran compiler works failed with " "the following output:\n${OUTPUT}\n\n") @@ -48,7 +48,7 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") else() if(FORTRAN_TEST_WAS_RUN) - PrintTestCompilerStatus("Fortran" " -- works") + PrintTestCompilerResult(CHECK_PASS "works") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran compiler works passed with " "the following output:\n${OUTPUT}\n\n") @@ -60,7 +60,7 @@ else() # Test for Fortran 90 support by using an f90-specific construct. if(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90) - message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90") + message(CHECK_START "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90") file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 " PROGRAM TESTFortran90 integer stop ; stop = 1 ; do while ( stop .eq. 0 ) ; end do @@ -70,13 +70,13 @@ else() ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 OUTPUT_VARIABLE OUTPUT) if(CMAKE_Fortran_COMPILER_SUPPORTS_F90) - message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes") + message(CHECK_PASS "yes") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran compiler supports Fortran 90 passed with " "the following output:\n${OUTPUT}\n\n") set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1) else() - message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- no") + message(CHECK_FAIL "no") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran compiler supports Fortran 90 failed with " "the following output:\n${OUTPUT}\n\n") diff --git a/Modules/CMakeTestOBJCCompiler.cmake b/Modules/CMakeTestOBJCCompiler.cmake index 0030683..bcc6fae 100644 --- a/Modules/CMakeTestOBJCCompiler.cmake +++ b/Modules/CMakeTestOBJCCompiler.cmake @@ -27,7 +27,7 @@ unset(CMAKE_OBJC_COMPILER_WORKS CACHE) # is set and cmake stops processing commands and will not generate # any makefiles or projects. if(NOT CMAKE_OBJC_COMPILER_WORKS) - PrintTestCompilerStatus("OBJC" "") + PrintTestCompilerStatus("OBJC") __TestCompiler_setTryCompileTargetType() file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testOBJCCompiler.m "#ifdef __cplusplus\n" @@ -49,7 +49,7 @@ if(NOT CMAKE_OBJC_COMPILER_WORKS) endif() if(NOT CMAKE_OBJC_COMPILER_WORKS) - PrintTestCompilerStatus("OBJC" " -- broken") + PrintTestCompilerResult(CHECK_FAIL "broken") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Objective-C compiler works failed with " "the following output:\n${__CMAKE_OBJC_COMPILER_OUTPUT}\n\n") @@ -60,7 +60,7 @@ if(NOT CMAKE_OBJC_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") else() if(OBJC_TEST_WAS_RUN) - PrintTestCompilerStatus("OBJC" " -- works") + PrintTestCompilerResult(CHECK_PASS "works") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Objective-C compiler works passed with " "the following output:\n${__CMAKE_OBJC_COMPILER_OUTPUT}\n\n") diff --git a/Modules/CMakeTestOBJCXXCompiler.cmake b/Modules/CMakeTestOBJCXXCompiler.cmake index bcce2f1..83227d5 100644 --- a/Modules/CMakeTestOBJCXXCompiler.cmake +++ b/Modules/CMakeTestOBJCXXCompiler.cmake @@ -27,7 +27,7 @@ unset(CMAKE_OBJCXX_COMPILER_WORKS CACHE) # is set and cmake stops processing commands and will not generate # any makefiles or projects. if(NOT CMAKE_OBJCXX_COMPILER_WORKS) - PrintTestCompilerStatus("OBJCXX" "") + PrintTestCompilerStatus("OBJCXX") __TestCompiler_setTryCompileTargetType() file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testOBJCXXCompiler.mm "#ifndef __cplusplus\n" @@ -48,7 +48,7 @@ if(NOT CMAKE_OBJCXX_COMPILER_WORKS) endif() if(NOT CMAKE_OBJCXX_COMPILER_WORKS) - PrintTestCompilerStatus("OBJCXX" " -- broken") + PrintTestCompilerResult(CHECK_FAIL "broken") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Objective-C++ compiler works failed with " "the following output:\n${__CMAKE_OBJCXX_COMPILER_OUTPUT}\n\n") @@ -59,7 +59,7 @@ if(NOT CMAKE_OBJCXX_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") else() if(OBJCXX_TEST_WAS_RUN) - PrintTestCompilerStatus("OBJCXX" " -- works") + PrintTestCompilerResult(CHECK_PASS "works") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Objective-C++ compiler works passed with " "the following output:\n${__CMAKE_OBJCXX_COMPILER_OUTPUT}\n\n") diff --git a/Modules/CMakeTestSwiftCompiler.cmake b/Modules/CMakeTestSwiftCompiler.cmake index 841aee6..3e4ff95 100644 --- a/Modules/CMakeTestSwiftCompiler.cmake +++ b/Modules/CMakeTestSwiftCompiler.cmake @@ -20,7 +20,7 @@ unset(CMAKE_Swift_COMPILER_WORKS CACHE) # is set and cmake stops processing commands and will not generate # any makefiles or projects. if(NOT CMAKE_Swift_COMPILER_WORKS) - PrintTestCompilerStatus("Swift" "") + PrintTestCompilerStatus("Swift") file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/main.swift "print(\"CMake\")\n") try_compile(CMAKE_Swift_COMPILER_WORKS ${CMAKE_BINARY_DIR} @@ -33,7 +33,7 @@ if(NOT CMAKE_Swift_COMPILER_WORKS) endif() if(NOT CMAKE_Swift_COMPILER_WORKS) - PrintTestCompilerStatus("Swift" " -- broken") + PrintTestCompilerResult(CHECK_FAIL "broken") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Swift compiler works failed with " "the following output:\n${__CMAKE_Swift_COMPILER_OUTPUT}\n\n") @@ -44,7 +44,7 @@ if(NOT CMAKE_Swift_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") else() if(Swift_TEST_WAS_RUN) - PrintTestCompilerStatus("Swift" " -- works") + PrintTestCompilerResult(CHECK_PASS "works") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Swift compiler works passed with " "the following output:\n${__CMAKE_Swift_COMPILER_OUTPUT}\n\n") diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake index 77ba0cc..67fc993 100644 --- a/Modules/CheckCSourceCompiles.cmake +++ b/Modules/CheckCSourceCompiles.cmake @@ -104,7 +104,7 @@ macro(CHECK_C_SOURCE_COMPILES SOURCE VAR) "${SOURCE}\n") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR}") + message(CHECK_START "Performing Test ${VAR}") endif() try_compile(${VAR} ${CMAKE_BINARY_DIR} @@ -125,7 +125,7 @@ macro(CHECK_C_SOURCE_COMPILES SOURCE VAR) if(${VAR}) set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Success") + message(CHECK_PASS "Success") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing C SOURCE FILE Test ${VAR} succeeded with the following output:\n" @@ -133,7 +133,7 @@ macro(CHECK_C_SOURCE_COMPILES SOURCE VAR) "Source file was:\n${SOURCE}\n") else() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Failed") + message(CHECK_FAIL "Failed") endif() set(${VAR} "" CACHE INTERNAL "Test ${VAR}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake index eba70f2..7d116db 100644 --- a/Modules/CheckCSourceRuns.cmake +++ b/Modules/CheckCSourceRuns.cmake @@ -92,7 +92,7 @@ macro(CHECK_C_SOURCE_RUNS SOURCE VAR) "${SOURCE}\n") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR}") + message(CHECK_START "Performing Test ${VAR}") endif() try_run(${VAR}_EXITCODE ${VAR}_COMPILED ${CMAKE_BINARY_DIR} @@ -113,7 +113,7 @@ macro(CHECK_C_SOURCE_RUNS SOURCE VAR) if("${${VAR}_EXITCODE}" EQUAL 0) set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Success") + message(CHECK_PASS "Success") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing C SOURCE FILE Test ${VAR} succeeded with the following compile output:\n" @@ -130,7 +130,7 @@ macro(CHECK_C_SOURCE_RUNS SOURCE VAR) endif() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Failed") + message(CHECK_FAIL "Failed") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing C SOURCE FILE Test ${VAR} failed with the following compile output:\n" diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake index cc457a5..c693d32 100644 --- a/Modules/CheckCXXSourceCompiles.cmake +++ b/Modules/CheckCXXSourceCompiles.cmake @@ -105,7 +105,7 @@ macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR) "${SOURCE}\n") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR}") + message(CHECK_START "Performing Test ${VAR}") endif() try_compile(${VAR} ${CMAKE_BINARY_DIR} @@ -126,7 +126,7 @@ macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR) if(${VAR}) set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Success") + message(CHECK_PASS "Success") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing C++ SOURCE FILE Test ${VAR} succeeded with the following output:\n" @@ -134,7 +134,7 @@ macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR) "Source file was:\n${SOURCE}\n") else() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Failed") + message(CHECK_FAIL "Failed") endif() set(${VAR} "" CACHE INTERNAL "Test ${VAR}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake index 5e3f195..408e183 100644 --- a/Modules/CheckCXXSourceRuns.cmake +++ b/Modules/CheckCXXSourceRuns.cmake @@ -92,7 +92,7 @@ macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR) "${SOURCE}\n") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR}") + message(CHECK_START "Performing Test ${VAR}") endif() try_run(${VAR}_EXITCODE ${VAR}_COMPILED ${CMAKE_BINARY_DIR} @@ -114,7 +114,7 @@ macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR) if("${${VAR}_EXITCODE}" EQUAL 0) set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Success") + message(CHECK_PASS "Success") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing C++ SOURCE FILE Test ${VAR} succeeded with the following output:\n" @@ -131,7 +131,7 @@ macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR) endif() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Failed") + message(CHECK_FAIL "Failed") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n" diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake index 7ca205a..d06203f 100644 --- a/Modules/CheckFortranFunctionExists.cmake +++ b/Modules/CheckFortranFunctionExists.cmake @@ -38,7 +38,7 @@ include_guard(GLOBAL) macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE) if(NOT DEFINED ${VARIABLE}) - message(STATUS "Looking for Fortran ${FUNCTION}") + message(CHECK_START "Looking for Fortran ${FUNCTION}") if(CMAKE_REQUIRED_LINK_OPTIONS) set(CHECK_FUNCTION_EXISTS_ADD_LINK_OPTIONS LINK_OPTIONS ${CMAKE_REQUIRED_LINK_OPTIONS}) @@ -61,21 +61,20 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE) " ) try_compile(${VARIABLE} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f - ${CHECK_FUNCTION_EXISTS_ADD_LINK_OPTIONS} - ${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES} - OUTPUT_VARIABLE OUTPUT + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f + ${CHECK_FUNCTION_EXISTS_ADD_LINK_OPTIONS} + ${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES} + OUTPUT_VARIABLE OUTPUT ) -# message(STATUS "${OUTPUT}") if(${VARIABLE}) set(${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") - message(STATUS "Looking for Fortran ${FUNCTION} - found") + message(CHECK_PASS "found") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" "${OUTPUT}\n\n") else() - message(STATUS "Looking for Fortran ${FUNCTION} - not found") + message(CHECK_FAIL "not found") set(${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake index f94b254..f0fde8d 100644 --- a/Modules/CheckFortranSourceCompiles.cmake +++ b/Modules/CheckFortranSourceCompiles.cmake @@ -127,7 +127,7 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR) "${SOURCE}\n") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR}") + message(CHECK_START "Performing Test ${VAR}") endif() try_compile(${VAR} ${CMAKE_BINARY_DIR} @@ -148,7 +148,7 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR) if(${VAR}) set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Success") + message(CHECK_PASS "Success") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing Fortran SOURCE FILE Test ${VAR} succeeded with the following output:\n" @@ -156,7 +156,7 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR) "Source file was:\n${SOURCE}\n") else() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Failed") + message(CHECK_FAIL "Failed") endif() set(${VAR} "" CACHE INTERNAL "Test ${VAR}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckFortranSourceRuns.cmake b/Modules/CheckFortranSourceRuns.cmake index a80c13d..a3e5d5d 100644 --- a/Modules/CheckFortranSourceRuns.cmake +++ b/Modules/CheckFortranSourceRuns.cmake @@ -122,7 +122,7 @@ macro(CHECK_Fortran_SOURCE_RUNS SOURCE VAR) "${SOURCE}\n") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR}") + message(CHECK_START "Performing Test ${VAR}") endif() try_run(${VAR}_EXITCODE ${VAR}_COMPILED ${CMAKE_BINARY_DIR} @@ -144,7 +144,7 @@ macro(CHECK_Fortran_SOURCE_RUNS SOURCE VAR) if("${${VAR}_EXITCODE}" EQUAL 0) set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Success") + message(CHECK_PASS "Success") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing Fortran SOURCE FILE Test ${VAR} succeeded with the following output:\n" @@ -161,7 +161,7 @@ macro(CHECK_Fortran_SOURCE_RUNS SOURCE VAR) endif() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Failed") + message(CHECK_FAIL "Failed") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing Fortran SOURCE FILE Test ${VAR} failed with the following output:\n" diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake index c39144f..136da89 100644 --- a/Modules/CheckFunctionExists.cmake +++ b/Modules/CheckFunctionExists.cmake @@ -57,7 +57,7 @@ macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE) set(MACRO_CHECK_FUNCTION_DEFINITIONS "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${FUNCTION}") + message(CHECK_START "Looking for ${FUNCTION}") endif() if(CMAKE_REQUIRED_LINK_OPTIONS) set(CHECK_FUNCTION_EXISTS_ADD_LINK_OPTIONS @@ -101,14 +101,14 @@ macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE) if(${VARIABLE}) set(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${FUNCTION} - found") + message(CHECK_PASS "found") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the function ${FUNCTION} exists passed with the following output:\n" "${OUTPUT}\n\n") else() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${FUNCTION} - not found") + message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake index d7b9481..3a10473 100644 --- a/Modules/CheckIncludeFile.cmake +++ b/Modules/CheckIncludeFile.cmake @@ -55,7 +55,7 @@ macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE) configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.c) if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${INCLUDE}") + message(CHECK_START "Looking for ${INCLUDE}") endif() if(${ARGC} EQUAL 3) set(CMAKE_C_FLAGS_SAVE ${CMAKE_C_FLAGS}) @@ -109,7 +109,7 @@ macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE) if(${VARIABLE}) if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${INCLUDE} - found") + message(CHECK_PASS "found") endif() set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log @@ -118,7 +118,7 @@ macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE) "${OUTPUT}\n\n") else() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${INCLUDE} - not found") + message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index de5a83b..496550f 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -54,7 +54,7 @@ macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx) if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for C++ include ${INCLUDE}") + message(CHECK_START "Looking for C++ include ${INCLUDE}") endif() if(${ARGC} EQUAL 3) set(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS}) @@ -108,7 +108,7 @@ macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) if(${VARIABLE}) if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for C++ include ${INCLUDE} - found") + message(CHECK_PASS "found") endif() set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log @@ -117,7 +117,7 @@ macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) "${OUTPUT}\n\n") else() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for C++ include ${INCLUDE} - not found") + message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index f52ab55..8e10cd6 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -131,7 +131,7 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE) endif() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${_description}") + message(CHECK_START "Looking for ${_description}") endif() try_compile(${VARIABLE} ${CMAKE_BINARY_DIR} @@ -147,7 +147,7 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE) unset(_CIF_LINK_LIBRARIES) if(${VARIABLE}) if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${_description} - found") + message(CHECK_PASS "found") endif() set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log @@ -156,7 +156,7 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE) "${OUTPUT}\n\n") else() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${_description} - not found") + message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have includes ${INCLUDE}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake index a1a3a7a..a337926 100644 --- a/Modules/CheckLanguage.cmake +++ b/Modules/CheckLanguage.cmake @@ -39,7 +39,7 @@ include_guard(GLOBAL) macro(check_language lang) if(NOT DEFINED CMAKE_${lang}_COMPILER) set(_desc "Looking for a ${lang} compiler") - message(STATUS ${_desc}) + message(CHECK_START "${_desc}") file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Check${lang}) set(extra_compiler_variables) @@ -78,13 +78,15 @@ file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\" file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "${_desc} passed with the following output:\n" "${output}\n") + set(_CHECK_COMPILER_STATUS CHECK_PASS) else() set(CMAKE_${lang}_COMPILER NOTFOUND) + set(_CHECK_COMPILER_STATUS CHECK_FAIL) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "${_desc} failed with the following output:\n" "${output}\n") endif() - message(STATUS "${_desc} - ${CMAKE_${lang}_COMPILER}") + message(${_CHECK_COMPILER_STATUS} "${CMAKE_${lang}_COMPILER}") set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER}" CACHE FILEPATH "${lang} compiler") mark_as_advanced(CMAKE_${lang}_COMPILER) diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake index 6504df5..6470dfd 100644 --- a/Modules/CheckLibraryExists.cmake +++ b/Modules/CheckLibraryExists.cmake @@ -42,7 +42,7 @@ macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) set(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${FUNCTION} in ${LIBRARY}") + message(CHECK_START "Looking for ${FUNCTION} in ${LIBRARY}") endif() set(CHECK_LIBRARY_EXISTS_LINK_OPTIONS) if(CMAKE_REQUIRED_LINK_OPTIONS) @@ -78,7 +78,7 @@ macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) if(${VARIABLE}) if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found") + message(CHECK_PASS "found") endif() set(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log @@ -87,7 +87,7 @@ macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) "${OUTPUT}\n\n") else() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found") + message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckOBJCSourceCompiles.cmake b/Modules/CheckOBJCSourceCompiles.cmake index a4676ad..601f1fa 100644 --- a/Modules/CheckOBJCSourceCompiles.cmake +++ b/Modules/CheckOBJCSourceCompiles.cmake @@ -104,7 +104,7 @@ macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR) "${SOURCE}\n") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR}") + message(CHECK_START "Performing Test ${VAR}") endif() try_compile(${VAR} ${CMAKE_BINARY_DIR} @@ -125,7 +125,7 @@ macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR) if(${VAR}) set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Success") + message(CHECK_PASS "Success") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing Objective-C SOURCE FILE Test ${VAR} succeeded with the following output:\n" @@ -133,7 +133,7 @@ macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR) "Source file was:\n${SOURCE}\n") else() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Failed") + message(CHECK_FAIL "Failed") endif() set(${VAR} "" CACHE INTERNAL "Test ${VAR}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckOBJCSourceRuns.cmake b/Modules/CheckOBJCSourceRuns.cmake index 00a1ebd..6684693 100644 --- a/Modules/CheckOBJCSourceRuns.cmake +++ b/Modules/CheckOBJCSourceRuns.cmake @@ -92,7 +92,7 @@ macro(CHECK_OBJC_SOURCE_RUNS SOURCE VAR) "${SOURCE}\n") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR}") + message(CHECK_START "Performing Test ${VAR}") endif() try_run(${VAR}_EXITCODE ${VAR}_COMPILED ${CMAKE_BINARY_DIR} @@ -113,7 +113,7 @@ macro(CHECK_OBJC_SOURCE_RUNS SOURCE VAR) if("${${VAR}_EXITCODE}" EQUAL 0) set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Success") + message(CHECK_PASS "Success") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing Objective-C SOURCE FILE Test ${VAR} succeeded with the following compile output:\n" @@ -130,7 +130,7 @@ macro(CHECK_OBJC_SOURCE_RUNS SOURCE VAR) endif() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Failed") + message(CHECK_FAIL "Failed") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing Objective-C SOURCE FILE Test ${VAR} failed with the following compile output:\n" diff --git a/Modules/CheckOBJCXXSourceCompiles.cmake b/Modules/CheckOBJCXXSourceCompiles.cmake index 4c0fdd0..2ee79f4 100644 --- a/Modules/CheckOBJCXXSourceCompiles.cmake +++ b/Modules/CheckOBJCXXSourceCompiles.cmake @@ -105,7 +105,7 @@ macro(CHECK_OBJCXX_SOURCE_COMPILES SOURCE VAR) "${SOURCE}\n") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR}") + message(CHECK_START "Performing Test ${VAR}") endif() try_compile(${VAR} ${CMAKE_BINARY_DIR} @@ -126,7 +126,7 @@ macro(CHECK_OBJCXX_SOURCE_COMPILES SOURCE VAR) if(${VAR}) set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Success") + message(CHECK_PASS "Success") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing Objective-C++ SOURCE FILE Test ${VAR} succeeded with the following output:\n" @@ -134,7 +134,7 @@ macro(CHECK_OBJCXX_SOURCE_COMPILES SOURCE VAR) "Source file was:\n${SOURCE}\n") else() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Failed") + message(CHECK_FAIL "Failed") endif() set(${VAR} "" CACHE INTERNAL "Test ${VAR}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckOBJCXXSourceRuns.cmake b/Modules/CheckOBJCXXSourceRuns.cmake index a3d5923..7f7e04f 100644 --- a/Modules/CheckOBJCXXSourceRuns.cmake +++ b/Modules/CheckOBJCXXSourceRuns.cmake @@ -92,7 +92,7 @@ macro(CHECK_OBJCXX_SOURCE_RUNS SOURCE VAR) "${SOURCE}\n") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR}") + message(CHECK_START "Performing Test ${VAR}") endif() try_run(${VAR}_EXITCODE ${VAR}_COMPILED ${CMAKE_BINARY_DIR} @@ -114,7 +114,7 @@ macro(CHECK_OBJCXX_SOURCE_RUNS SOURCE VAR) if("${${VAR}_EXITCODE}" EQUAL 0) set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Success") + message(CHECK_PASS "Success") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing Objective-C++ SOURCE FILE Test ${VAR} succeeded with the following output:\n" @@ -131,7 +131,7 @@ macro(CHECK_OBJCXX_SOURCE_RUNS SOURCE VAR) endif() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${VAR} - Failed") + message(CHECK_FAIL "Failed") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing Objective-C++ SOURCE FILE Test ${VAR} failed with the following output:\n" diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake index a7b020c..8b06403 100644 --- a/Modules/CheckPrototypeDefinition.cmake +++ b/Modules/CheckPrototypeDefinition.cmake @@ -54,6 +54,9 @@ include_guard(GLOBAL) function(check_prototype_definition _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE) if (NOT DEFINED ${_VARIABLE}) + if(NOT CMAKE_REQUIRED_QUIET) + message(CHECK_START "Checking prototype ${_FUNCTION} for ${_VARIABLE}") + endif() set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n") set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS}) @@ -103,14 +106,14 @@ function(check_prototype_definition _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB if (${_VARIABLE}) set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True") + message(CHECK_PASS "True") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n" "${OUTPUT}\n\n") else () if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False") + message(CHECK_FAIL "False") endif() set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index 1053383..4f202c4 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -126,7 +126,7 @@ int main(int argc, char** argv) "${SOURCEFILE}" @ONLY) if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${SYMBOL}") + message(CHECK_START "Looking for ${SYMBOL}") endif() try_compile(${VARIABLE} ${CMAKE_BINARY_DIR} @@ -140,7 +140,7 @@ int main(int argc, char** argv) OUTPUT_VARIABLE OUTPUT) if(${VARIABLE}) if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${SYMBOL} - found") + message(CHECK_PASS "found") endif() set(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log @@ -150,7 +150,7 @@ int main(int argc, char** argv) "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n") else() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${SYMBOL} - not found") + message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index 3727373..2b07b7c 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -86,7 +86,7 @@ cmake_policy(SET CMP0054 NEW) # Helper function. DO NOT CALL DIRECTLY. function(__check_type_size_impl type var map builtin language) if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Check size of ${type}") + message(CHECK_START "Check size of ${type}") endif() # Include header files. @@ -173,7 +173,7 @@ function(__check_type_size_impl type var map builtin language) endif() if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Check size of ${type} - done") + message(CHECK_PASS "done") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining size of ${type} passed with the following output:\n${output}\n\n") @@ -181,7 +181,7 @@ function(__check_type_size_impl type var map builtin language) else() # The check failed to compile. if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Check size of ${type} - failed") + message(CHECK_FAIL "failed") endif() file(READ ${src} content) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake index f4953a3..8a93535 100644 --- a/Modules/CheckVariableExists.cmake +++ b/Modules/CheckVariableExists.cmake @@ -42,7 +42,7 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE) set(MACRO_CHECK_VARIABLE_DEFINITIONS "-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${VAR}") + message(CHECK_START "Looking for ${VAR}") endif() if(CMAKE_REQUIRED_LINK_OPTIONS) set(CHECK_VARIABLE_EXISTS_ADD_LINK_OPTIONS @@ -67,7 +67,7 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE) if(${VARIABLE}) set(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${VAR} - found") + message(CHECK_PASS "found") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the variable ${VAR} exists passed with the following output:\n" @@ -75,7 +75,7 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE) else() set(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Looking for ${VAR} - not found") + message(CHECK_FAIL "not found") endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the variable ${VAR} exists failed with the following output:\n" diff --git a/Modules/Compiler/NAG-Fortran.cmake b/Modules/Compiler/NAG-Fortran.cmake index 9973feb..c54ab9d 100644 --- a/Modules/Compiler/NAG-Fortran.cmake +++ b/Modules/Compiler/NAG-Fortran.cmake @@ -1,6 +1,6 @@ # Help CMAKE_PARSE_IMPLICIT_LINK_INFO detect NAG Fortran object files. if(NOT CMAKE_Fortran_COMPILER_WORKS AND NOT CMAKE_Fortran_COMPILER_FORCED) - message(STATUS "Detecting NAG Fortran directory") + message(CHECK_START "Detecting NAG Fortran directory") # Run with -dryrun to see sample "link" line. execute_process( COMMAND ${CMAKE_Fortran_COMPILER} dummy.o -dryrun @@ -20,11 +20,11 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS AND NOT CMAKE_Fortran_COMPILER_FORCED) " directory: ${_nag_dir}\n" " regex: ${CMAKE_Fortran_IMPLICIT_OBJECT_REGEX}\n" "from output:\n${_dryrun}\n\n") - message(STATUS "Detecting NAG Fortran directory - ${_nag_dir}") + message(CHECK_PASS "${_nag_dir}") else() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Detecting NAG Fortran directory with -dryrun failed:\n${_dryrun}\n\n") - message(STATUS "Detecting NAG Fortran directory - failed") + message(CHECK_FAIL "failed") endif() endif() diff --git a/Modules/FindDCMTK.cmake b/Modules/FindDCMTK.cmake index d48de08..b2e00df 100644 --- a/Modules/FindDCMTK.cmake +++ b/Modules/FindDCMTK.cmake @@ -102,7 +102,7 @@ set(_SAVED_DCMTK_DIR ${DCMTK_DIR}) # Step1: Attempt to find a version of DCMTK providing a DCMTKConfig.cmake file. # if(NOT DCMTK_FIND_QUIETLY) - message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake") + message(CHECK_START "Trying to find DCMTK expecting DCMTKConfig.cmake") endif() find_package(DCMTK QUIET NO_MODULE) if(DCMTK_FOUND @@ -110,12 +110,12 @@ if(DCMTK_FOUND AND NOT "x" STREQUAL "x${DCMTK_INCLUDE_DIRS}") if(NOT DCMTK_FIND_QUIETLY) - message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - ok") + message(CHECK_PASS "ok") endif() return() else() if(NOT DCMTK_FIND_QUIETLY) - message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - failed") + message(CHECK_FAIL "failed") endif() endif() diff --git a/Modules/FindMFC.cmake b/Modules/FindMFC.cmake index e366619..b8ca71b 100644 --- a/Modules/FindMFC.cmake +++ b/Modules/FindMFC.cmake @@ -31,7 +31,7 @@ if(MFC_ATTEMPT_TRY_COMPILE) set(CHECK_INCLUDE_FILE_VAR "afxwin.h") configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx) - message(STATUS "Looking for MFC") + message(CHECK_START "Looking for MFC") # Try both shared and static as the root project may have set the /MT flag try_compile(MFC_HAVE_MFC ${CMAKE_BINARY_DIR} @@ -51,13 +51,13 @@ if(MFC_ATTEMPT_TRY_COMPILE) OUTPUT_VARIABLE OUTPUT) endif() if(MFC_HAVE_MFC) - message(STATUS "Looking for MFC - found") + message(CHECK_PASS "found") set(MFC_HAVE_MFC 1 CACHE INTERNAL "Have MFC?") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if MFC exists passed with the following output:\n" "${OUTPUT}\n\n") else() - message(STATUS "Looking for MFC - not found") + message(CHECK_FAIL "not found") set(MFC_HAVE_MFC 0 CACHE INTERNAL "Have MFC?") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if MFC exists failed with the following output:\n" diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index d39fe33..1780511 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -90,7 +90,7 @@ macro(_check_pthreads_flag) if(NOT Threads_FOUND) # If we did not find a thread library look for -pthread compiler option. if(NOT DEFINED THREADS_HAVE_PTHREAD_ARG) - message(STATUS "Check if compiler accepts -pthread") + message(CHECK_START "Check if compiler accepts -pthread") if(CMAKE_C_COMPILER_LOADED) set(_threads_src ${CMAKE_CURRENT_LIST_DIR}/CheckForPthreads.c) elseif(CMAKE_CXX_COMPILER_LOADED) @@ -106,9 +106,9 @@ macro(_check_pthreads_flag) if(THREADS_HAVE_PTHREAD_ARG) set(Threads_FOUND TRUE) - message(STATUS "Check if compiler accepts -pthread - yes") + message(CHECK_PASS "yes") else() - message(STATUS "Check if compiler accepts -pthread - no") + message(CHECK_FAIL "no") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n") diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake index 893a96f..547346b 100644 --- a/Modules/FortranCInterface.cmake +++ b/Modules/FortranCInterface.cmake @@ -341,7 +341,7 @@ function(FortranCInterface_VERIFY) # Build the verification project if not yet built. if(NOT DEFINED FortranCInterface_VERIFIED_${lang}) set(_desc "Verifying Fortran/${lang} Compiler Compatibility") - message(STATUS "${_desc}") + message(CHECK_START "${_desc}") # Build a sample project which reports symbols. set(CMAKE_TRY_COMPILE_CONFIGURATION Release) @@ -363,12 +363,12 @@ function(FortranCInterface_VERIFY) # Report results. if(FortranCInterface_VERIFY_${lang}_COMPILED) - message(STATUS "${_desc} - Success") + message(CHECK_PASS "Success") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "${_desc} passed with the following output:\n${_output}\n\n") set(FortranCInterface_VERIFIED_${lang} 1 CACHE INTERNAL "Fortran/${lang} compatibility") else() - message(STATUS "${_desc} - Failed") + message(CHECK_FAIL "Failed") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "${_desc} failed with the following output:\n${_output}\n\n") set(FortranCInterface_VERIFIED_${lang} 0 CACHE INTERNAL "Fortran/${lang} compatibility") diff --git a/Modules/FortranCInterface/Detect.cmake b/Modules/FortranCInterface/Detect.cmake index 7789785..33de6c6 100644 --- a/Modules/FortranCInterface/Detect.cmake +++ b/Modules/FortranCInterface/Detect.cmake @@ -15,7 +15,7 @@ if(${FortranCInterface_BINARY_DIR}/Input.cmake OR ${CMAKE_CURRENT_LIST_FILE} IS_NEWER_THAN ${FortranCInterface_BINARY_DIR}/Output.cmake ) - message(STATUS "Detecting Fortran/C Interface") + message(CHECK_START "Detecting Fortran/C Interface") else() return() endif() @@ -172,7 +172,9 @@ if(FortranCInterface_GLOBAL_FOUND) else() set(_result "Found GLOBAL but not MODULE mangling") endif() + set(_result_type CHECK_PASS) elseif(NOT _result) set(_result "Failed to recognize symbols") + set(_result_type CHECK_FAIL) endif() -message(STATUS "Detecting Fortran/C Interface - ${_result}") +message(${_result_type} "${_result}") diff --git a/Modules/Platform/Apple-GNU.cmake b/Modules/Platform/Apple-GNU.cmake index 0eb8168..9572736 100644 --- a/Modules/Platform/Apple-GNU.cmake +++ b/Modules/Platform/Apple-GNU.cmake @@ -19,17 +19,17 @@ endmacro() macro(cmake_gnu_set_sysroot_flag lang) if(NOT DEFINED CMAKE_${lang}_SYSROOT_FLAG) set(_doc "${lang} compiler has -isysroot") - message(STATUS "Checking whether ${_doc}") + message(CHECK_START "Checking whether ${_doc}") execute_process( COMMAND ${CMAKE_${lang}_COMPILER} "-v" "--help" OUTPUT_VARIABLE _gcc_help ERROR_VARIABLE _gcc_help ) if("${_gcc_help}" MATCHES "isysroot") - message(STATUS "Checking whether ${_doc} - yes") + message(CHECK_PASS "yes") set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot") else() - message(STATUS "Checking whether ${_doc} - no") + message(CHECK_FAIL "no") set(CMAKE_${lang}_SYSROOT_FLAG "") endif() set(CMAKE_${lang}_SYSROOT_FLAG_CODE "set(CMAKE_${lang}_SYSROOT_FLAG \"${CMAKE_${lang}_SYSROOT_FLAG}\")") @@ -39,17 +39,17 @@ endmacro() macro(cmake_gnu_set_osx_deployment_target_flag lang) if(NOT DEFINED CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG) set(_doc "${lang} compiler supports OSX deployment target flag") - message(STATUS "Checking whether ${_doc}") + message(CHECK_START "Checking whether ${_doc}") execute_process( COMMAND ${CMAKE_${lang}_COMPILER} "-v" "--help" OUTPUT_VARIABLE _gcc_help ERROR_VARIABLE _gcc_help ) if("${_gcc_help}" MATCHES "macosx-version-min") - message(STATUS "Checking whether ${_doc} - yes") + message(CHECK_PASS "yes") set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=") else() - message(STATUS "Checking whether ${_doc} - no") + message(CHECK_FAIL "no") set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "") endif() set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG_CODE "set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG \"${CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG}\")") diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake index 0c6e188..8a769b7 100644 --- a/Modules/TestBigEndian.cmake +++ b/Modules/TestBigEndian.cmake @@ -19,8 +19,8 @@ include(CheckTypeSize) macro(TEST_BIG_ENDIAN VARIABLE) if(NOT DEFINED HAVE_${VARIABLE}) - message(STATUS "Check if the system is big endian") - message(STATUS "Searching 16 bit integer") + message(CHECK_START "Check if the system is big endian") + message(CHECK_START "Searching 16 bit integer") if(CMAKE_C_COMPILER_LOADED) set(_test_language "C") @@ -32,19 +32,19 @@ macro(TEST_BIG_ENDIAN VARIABLE) CHECK_TYPE_SIZE("unsigned short" CMAKE_SIZEOF_UNSIGNED_SHORT LANGUAGE ${_test_language}) if(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2) - message(STATUS "Using unsigned short") + message(CHECK_PASS "Using unsigned short") set(CMAKE_16BIT_TYPE "unsigned short") else() CHECK_TYPE_SIZE("unsigned int" CMAKE_SIZEOF_UNSIGNED_INT LANGUAGE ${_test_language}) if(CMAKE_SIZEOF_UNSIGNED_INT) - message(STATUS "Using unsigned int") + message(CHECK_PASS "Using unsigned int") set(CMAKE_16BIT_TYPE "unsigned int") else() CHECK_TYPE_SIZE("unsigned long" CMAKE_SIZEOF_UNSIGNED_LONG LANGUAGE ${_test_language}) if(CMAKE_SIZEOF_UNSIGNED_LONG) - message(STATUS "Using unsigned long") + message(CHECK_PASS "Using unsigned long") set(CMAKE_16BIT_TYPE "unsigned long") else() message(FATAL_ERROR "no suitable type found") @@ -95,15 +95,16 @@ macro(TEST_BIG_ENDIAN VARIABLE) if(CMAKE_TEST_ENDIANESS_STRINGS_LE) set(${VARIABLE} 0 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE) - message(STATUS "Check if the system is big endian - little endian") + message(CHECK_PASS "little endian") endif() if(CMAKE_TEST_ENDIANESS_STRINGS_BE) set(${VARIABLE} 1 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE) - message(STATUS "Check if the system is big endian - big endian") + message(CHECK_PASS "big endian") endif() if(NOT CMAKE_TEST_ENDIANESS_STRINGS_BE AND NOT CMAKE_TEST_ENDIANESS_STRINGS_LE) + message(CHECK_FAIL "TEST_BIG_ENDIAN found no result!") message(SEND_ERROR "TEST_BIG_ENDIAN found no result!") endif() @@ -111,7 +112,7 @@ macro(TEST_BIG_ENDIAN VARIABLE) "Determining if the system is big endian passed with the following output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n") else() - message(STATUS "Check if the system is big endian - failed") + message(CHECK_FAIL "failed") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the system is big endian failed with the following output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n") set(${VARIABLE}) diff --git a/Modules/TestCXXAcceptsFlag.cmake b/Modules/TestCXXAcceptsFlag.cmake index 92a362e..ce505f3 100644 --- a/Modules/TestCXXAcceptsFlag.cmake +++ b/Modules/TestCXXAcceptsFlag.cmake @@ -23,19 +23,19 @@ Check if the CXX compiler accepts a flag. macro(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE) if(NOT DEFINED ${VARIABLE}) - message(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS}") + message(CHECK_START "Checking to see if CXX compiler accepts flag ${FLAGS}") try_compile(${VARIABLE} ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/DummyCXXFile.cxx CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${FLAGS} OUTPUT_VARIABLE OUTPUT) if(${VARIABLE}) - message(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS} - yes") + message(CHECK_PASS "yes") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the CXX compiler accepts the flag ${FLAGS} passed with " "the following output:\n${OUTPUT}\n\n") else() - message(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS} - no") + message(CHECK_FAIL "no") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the CXX compiler accepts the flag ${FLAGS} failed with " "the following output:\n${OUTPUT}\n\n") diff --git a/Modules/TestForANSIForScope.cmake b/Modules/TestForANSIForScope.cmake index 272e4ec..0f2dc01 100644 --- a/Modules/TestForANSIForScope.cmake +++ b/Modules/TestForANSIForScope.cmake @@ -16,19 +16,19 @@ for-init-statement to the loop body. #]=======================================================================] if(NOT DEFINED CMAKE_ANSI_FOR_SCOPE) - message(STATUS "Check for ANSI scope") + message(CHECK_START "Check for ANSI scope") try_compile(CMAKE_ANSI_FOR_SCOPE ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx OUTPUT_VARIABLE OUTPUT) if (CMAKE_ANSI_FOR_SCOPE) - message(STATUS "Check for ANSI scope - found") + message(CHECK_PASS "found") set (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL "Does the compiler support ansi for scope.") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the CXX compiler understands ansi for scopes passed with " "the following output:\n${OUTPUT}\n\n") else () - message(STATUS "Check for ANSI scope - not found") + message(CHECK_FAIL "not found") set (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL "Does the compiler support ansi for scope.") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/TestForSSTREAM.cmake b/Modules/TestForSSTREAM.cmake index e70df00..545b7ec 100644 --- a/Modules/TestForSSTREAM.cmake +++ b/Modules/TestForSSTREAM.cmake @@ -15,19 +15,19 @@ check if the compiler supports the standard ANSI sstream header #]=======================================================================] if(NOT DEFINED CMAKE_HAS_ANSI_STRING_STREAM) - message(STATUS "Check for sstream") + message(CHECK_START "Check for sstream") try_compile(CMAKE_HAS_ANSI_STRING_STREAM ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/TestForSSTREAM.cxx OUTPUT_VARIABLE OUTPUT) if (CMAKE_HAS_ANSI_STRING_STREAM) - message(STATUS "Check for sstream - found") + message(CHECK_PASS "found") set (CMAKE_NO_ANSI_STRING_STREAM 0 CACHE INTERNAL "Does the compiler support sstream") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the CXX compiler has sstream passed with " "the following output:\n${OUTPUT}\n\n") else () - message(STATUS "Check for sstream - not found") + message(CHECK_FAIL "not found") set (CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL "Does the compiler support sstream") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Modules/TestForSTDNamespace.cmake b/Modules/TestForSTDNamespace.cmake index 703e631..d101c83 100644 --- a/Modules/TestForSTDNamespace.cmake +++ b/Modules/TestForSTDNamespace.cmake @@ -15,19 +15,19 @@ check if the compiler supports std:: on stl classes #]=======================================================================] if(NOT DEFINED CMAKE_STD_NAMESPACE) - message(STATUS "Check for STD namespace") + message(CHECK_START "Check for STD namespace") try_compile(CMAKE_STD_NAMESPACE ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/TestForSTDNamespace.cxx OUTPUT_VARIABLE OUTPUT) if (CMAKE_STD_NAMESPACE) - message(STATUS "Check for STD namespace - found") + message(CHECK_PASS "found") set (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL "Does the compiler support std::.") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the CXX compiler has std namespace passed with " "the following output:\n${OUTPUT}\n\n") else () - message(STATUS "Check for STD namespace - not found") + message(CHECK_FAIL "not found") set (CMAKE_NO_STD_NAMESPACE 1 CACHE INTERNAL "Does the compiler support std::.") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log diff --git a/Source/Checks/Curses.cmake b/Source/Checks/Curses.cmake index 2942b66..d35dd2a 100644 --- a/Source/Checks/Curses.cmake +++ b/Source/Checks/Curses.cmake @@ -1,4 +1,7 @@ -message(STATUS "Checking for curses support") +include(${CMAKE_CURRENT_LIST_DIR}/cm_message_checks_compat.cmake) +cm_message_checks_compat( + "Checking for curses support" __checkStart __checkPass __checkFail) +message(${__checkStart}) # Try compiling a simple project using curses. # Pass in any cache entries that the user may have set. @@ -31,11 +34,11 @@ set(CMakeCheckCurses_COMPILED "${CMakeCheckCurses_COMPILED}") unset(CMakeCheckCurses_COMPILED CACHE) if(CMakeCheckCurses_COMPILED) - message(STATUS "Checking for curses support - Success") + message(${__checkPass} "Success") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Checking for curses support passed with the following output:\n${CMakeCheckCurses_OUTPUT}\n\n") else() - message(STATUS "Checking for curses support - Failed") + message(${__checkFail} "Failed") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Checking for curses support failed with the following output:\n${CMakeCheckCurses_OUTPUT}\n\n") endif() diff --git a/Source/Checks/cm_c11_thread_local.cmake b/Source/Checks/cm_c11_thread_local.cmake index 6b8d10b..2263be3 100644 --- a/Source/Checks/cm_c11_thread_local.cmake +++ b/Source/Checks/cm_c11_thread_local.cmake @@ -1,7 +1,11 @@ set(CMake_C11_THREAD_LOCAL_BROKEN 0) if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_C11_STANDARD_COMPILE_OPTION) if(NOT DEFINED CMake_C11_THREAD_LOCAL_WORKS) - message(STATUS "Checking if compiler supports C11 _Thread_local") + include(${CMAKE_CURRENT_LIST_DIR}/cm_message_checks_compat.cmake) + cm_message_checks_compat( + "Checking if compiler supports C11 _Thread_local" + __checkStart __checkPass __checkFail) + message(${__checkStart}) try_compile(CMake_C11_THREAD_LOCAL_WORKS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_LIST_DIR}/cm_c11_thread_local.c @@ -12,14 +16,14 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_C11_STANDARD_COMPILE_OPTION) set_property(CACHE CMake_C11_THREAD_LOCAL_WORKS PROPERTY VALUE 0) endif() if(CMake_C11_THREAD_LOCAL_WORKS) - message(STATUS "Checking if compiler supports C11 _Thread_local - yes") + message(${__checkPass} "yes") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if compiler supports C11 _Thread_local passed with the following output:\n" "${OUTPUT}\n" "\n" ) else() - message(STATUS "Checking if compiler supports C11 _Thread_local - no") + message(${__checkFail} "no") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if compiler supports C11 _Thread_local failed with the following output:\n" "${OUTPUT}\n" diff --git a/Source/Checks/cm_cxx14_check.cmake b/Source/Checks/cm_cxx14_check.cmake index 38606b9..8e9c2c7 100644 --- a/Source/Checks/cm_cxx14_check.cmake +++ b/Source/Checks/cm_cxx14_check.cmake @@ -4,7 +4,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|PGI") set(CMake_CXX14_WORKS 0) endif() if(NOT DEFINED CMake_CXX14_WORKS) - message(STATUS "Checking if compiler supports needed C++14 constructs") + include(${CMAKE_CURRENT_LIST_DIR}/cm_message_checks_compat.cmake) + cm_message_checks_compat( + "Checking if compiler supports needed C++14 constructs" + __checkStart __checkPass __checkFail) + message(${__checkStart}) try_compile(CMake_CXX14_WORKS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_LIST_DIR}/cm_cxx14_check.cpp @@ -15,14 +19,14 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|PGI") set_property(CACHE CMake_CXX14_WORKS PROPERTY VALUE 0) endif() if(CMake_CXX14_WORKS) - message(STATUS "Checking if compiler supports needed C++14 constructs - yes") + message(${__checkPass} "yes") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if compiler supports needed C++14 constructs passed with the following output:\n" "${OUTPUT}\n" "\n" ) else() - message(STATUS "Checking if compiler supports needed C++14 constructs - no") + message(${__checkFail} "no") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if compiler supports needed C++14 constructs failed with the following output:\n" "${OUTPUT}\n" diff --git a/Source/Checks/cm_cxx17_check.cmake b/Source/Checks/cm_cxx17_check.cmake index 4da2fd7..9e1d9c3 100644 --- a/Source/Checks/cm_cxx17_check.cmake +++ b/Source/Checks/cm_cxx17_check.cmake @@ -4,7 +4,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|PGI") set(CMake_CXX17_WORKS 0) endif() if(NOT DEFINED CMake_CXX17_WORKS) - message(STATUS "Checking if compiler supports needed C++17 constructs") + include(${CMAKE_CURRENT_LIST_DIR}/cm_message_checks_compat.cmake) + cm_message_checks_compat( + "Checking if compiler supports needed C++17 constructs" + __checkStart __checkPass __checkFail) + message(${__checkStart}) try_compile(CMake_CXX17_WORKS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_LIST_DIR}/cm_cxx17_check.cpp @@ -15,14 +19,14 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|PGI") set_property(CACHE CMake_CXX17_WORKS PROPERTY VALUE 0) endif() if(CMake_CXX17_WORKS) - message(STATUS "Checking if compiler supports needed C++17 constructs - yes") + message(${__checkPass} "yes") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if compiler supports needed C++17 constructs passed with the following output:\n" "${OUTPUT}\n" "\n" ) else() - message(STATUS "Checking if compiler supports needed C++17 constructs - no") + message(${__checkFail} "no") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if compiler supports needed C++17 constructs failed with the following output:\n" "${OUTPUT}\n" diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index fb68ed7..de8a77a 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -1,8 +1,12 @@ +include(${CMAKE_CURRENT_LIST_DIR}/cm_message_checks_compat.cmake) function(cm_check_cxx_feature name) string(TOUPPER ${name} FEATURE) if(NOT DEFINED CMake_HAVE_CXX_${FEATURE}) - message(STATUS "Checking if compiler supports C++ ${name}") + cm_message_checks_compat( + "Checking if compiler supports C++ ${name}" + __checkStart __checkPass __checkFail) + message(${__checkStart}) if(CMAKE_CXX_STANDARD) set(maybe_cxx_standard -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}) else() @@ -31,14 +35,14 @@ function(cm_check_cxx_feature name) set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE) endif() if(CMake_HAVE_CXX_${FEATURE}) - message(STATUS "Checking if compiler supports C++ ${name} - yes") + message(${__checkPass} "yes") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if compiler supports C++ ${name} passed with the following output:\n" "${OUTPUT}\n" "\n" ) else() - message(STATUS "Checking if compiler supports C++ ${name} - no") + message(${__checkFail} "no") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if compiler supports C++ ${name} failed with the following output:\n" "${OUTPUT}\n" diff --git a/Source/Checks/cm_message_checks_compat.cmake b/Source/Checks/cm_message_checks_compat.cmake new file mode 100644 index 0000000..024c397 --- /dev/null +++ b/Source/Checks/cm_message_checks_compat.cmake @@ -0,0 +1,13 @@ +# Supporting using the CHECK_... message modes if available +# and fall back to the older behavior if not +macro(cm_message_checks_compat description startVar passVar failVar) + if(CMAKE_VERSION VERSION_GREATER 3.16.2019) + set(${startVar} CHECK_START "${description}") + set(${passVar} CHECK_PASS) + set(${failVar} CHECK_FAIL) + else() + set(${startVar} STATUS "${description}") + set(${passVar} STATUS "${description} - ") + set(${failVar} STATUS "${description} - ") + endif() +endmacro() |