CMake: use "mode" argument for messages

While it's optional, include by convention and helps to clarify the
purpose of a message.
This commit is contained in:
Campbell Barton
2025-05-20 11:15:35 +10:00
parent f365824b40
commit 29ab328f35
2 changed files with 4 additions and 2 deletions

View File

@@ -1043,7 +1043,9 @@ if(WITH_COMPILER_CODE_COVERAGE)
set(_code_coverage_defaults "-fprofile-instr-generate -fcoverage-mapping")
endif()
else()
message("unsupported compiler ${CMAKE_C_COMPILER_ID} for WITH_COMPILER_CODE_COVERAGE, disabling.")
message(WARNING
"unsupported compiler ${CMAKE_C_COMPILER_ID} for WITH_COMPILER_CODE_COVERAGE, disabling."
)
set(WITH_COMPILER_CODE_COVERAGE OFF)
endif()

View File

@@ -208,7 +208,7 @@ if(WITH_COMPILER_ASAN AND MSVC AND NOT MSVC_CLANG)
string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /INCREMENTAL:NO")
string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " /INCREMENTAL:NO")
else()
message("-- ASAN not supported on MSVC ${CMAKE_CXX_COMPILER_VERSION}")
message(WARNING "ASAN not supported on MSVC ${CMAKE_CXX_COMPILER_VERSION}")
endif()
endif()