summaryrefslogtreecommitdiffstats
path: root/Source/Checks/cm_cxx17_check.cmake
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2019-08-13 02:02:14 (GMT)
committerAlex Turbov <i.zaufi@gmail.com>2019-11-02 12:10:09 (GMT)
commit7b2dd9dedc8195d2b3bc493dd5ab48cdd2fc3a7b (patch)
tree1e2d2c76f0ff3a5c7293517936aa18be7d6f58a9 /Source/Checks/cm_cxx17_check.cmake
parent949a1e120a3c2d9ecac08f7240a27d307fad503f (diff)
downloadCMake-7b2dd9dedc8195d2b3bc493dd5ab48cdd2fc3a7b.zip
CMake-7b2dd9dedc8195d2b3bc493dd5ab48cdd2fc3a7b.tar.gz
CMake-7b2dd9dedc8195d2b3bc493dd5ab48cdd2fc3a7b.tar.bz2
Refactor: Use added message types in various modules
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
Diffstat (limited to 'Source/Checks/cm_cxx17_check.cmake')
-rw-r--r--Source/Checks/cm_cxx17_check.cmake10
1 files changed, 7 insertions, 3 deletions
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"