Skip to content

Commit 09b9094

Browse files
authored
adjusted mode of some CMake messages (#8278)
this allows CMake to fail with `-Werror=` is specified
1 parent 02119e5 commit 09b9094

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/options.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ option(ANALYZE_TYPE "Build with TypeSanitizer to detect aliasing issues"
2525
option(WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF)
2626
if(WARNINGS_ARE_ERRORS)
2727
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24")
28-
message(WARNING "WARNINGS_ARE_ERRORS is deprecated - please use CMAKE_COMPILE_WARNING_AS_ERROR instead")
28+
message(DEPRECATION "WARNINGS_ARE_ERRORS is deprecated - please use CMAKE_COMPILE_WARNING_AS_ERROR instead")
2929
endif()
3030
set(CMAKE_COMPILE_WARNING_AS_ERROR On)
3131
endif()
@@ -58,9 +58,9 @@ if(BUILD_CORE_DLL AND NOT MSVC)
5858
endif()
5959
# need to check before the option() specifying it or it will be defined
6060
if(DEFINED BUILD_TESTS)
61-
message(WARNING "BUILD_TESTS has been deprecated and will be removed in Cppcheck 2.22 - please use BUILD_TESTING instead")
61+
message(DEPRECATION "BUILD_TESTS has been deprecated and will be removed in Cppcheck 2.22 - please use BUILD_TESTING instead")
6262
if(DEFINED BUILD_TESTING)
63-
message(WARNING "BUILD_TESTS and BUILD_TESTING have been defined at the same time - ignoring BUILD_TESTS")
63+
message(AUTHOR_WARNING "BUILD_TESTS and BUILD_TESTING have been defined at the same time - ignoring BUILD_TESTS")
6464
else()
6565
set(BUILD_TESTING "${BUILD_TESTS}")
6666
endif()

0 commit comments

Comments
 (0)