summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/message/RunCMakeTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/message/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/message/RunCMakeTest.cmake82
1 files changed, 42 insertions, 40 deletions
diff --git a/Tests/RunCMake/message/RunCMakeTest.cmake b/Tests/RunCMake/message/RunCMakeTest.cmake
index 3c7e51c..9198a25 100644
--- a/Tests/RunCMake/message/RunCMakeTest.cmake
+++ b/Tests/RunCMake/message/RunCMakeTest.cmake
@@ -11,47 +11,49 @@ run_cmake(warnmessage)
run_cmake(errormessage_deprecated)
run_cmake(errormessage_dev)
-run_cmake_command(
- message-loglevel-invalid
- ${CMAKE_COMMAND} --loglevel=blah -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
- )
+foreach(opt IN ITEMS loglevel log-level)
+ run_cmake_command(
+ message-${opt}-invalid
+ ${CMAKE_COMMAND} --${opt}=blah -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
+ )
-# Checking various combinations of `message(...)` and log levels `WARNING` to `TRACE`
-# - no CLI option -> `WARNING` to `STATUS` output
-run_cmake_command(
- message-loglevel-default
- ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
- )
-# - Only `WARNING` output
-run_cmake_command(
- message-loglevel-warning
- ${CMAKE_COMMAND} --loglevel=warning -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
- )
-# - Only `WARNING` and `NOTICE` output
-run_cmake_command(
- message-loglevel-notice
- ${CMAKE_COMMAND} --loglevel=notice -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
- )
-# - `WARNING` to `STATUS` output
-run_cmake_command(
- message-loglevel-status
- ${CMAKE_COMMAND} --loglevel=status -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
- )
-# - `WARNING` to `VERBOSE` output
-run_cmake_command(
- message-loglevel-verbose
- ${CMAKE_COMMAND} --loglevel=verbose -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
- )
-# - `WARNING` to `DEBUG` output
-run_cmake_command(
- message-loglevel-debug
- ${CMAKE_COMMAND} --loglevel=debug -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
- )
-# - `WARNING` to `TRACE` output
-run_cmake_command(
- message-loglevel-trace
- ${CMAKE_COMMAND} --loglevel=trace -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
- )
+ # Checking various combinations of `message(...)` and log levels `WARNING` to `TRACE`
+ # - no CLI option -> `WARNING` to `STATUS` output
+ run_cmake_command(
+ message-${opt}-default
+ ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
+ )
+ # - Only `WARNING` output
+ run_cmake_command(
+ message-${opt}-warning
+ ${CMAKE_COMMAND} --${opt}=warning -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
+ )
+ # - Only `WARNING` and `NOTICE` output
+ run_cmake_command(
+ message-${opt}-notice
+ ${CMAKE_COMMAND} --${opt}=notice -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
+ )
+ # - `WARNING` to `STATUS` output
+ run_cmake_command(
+ message-${opt}-status
+ ${CMAKE_COMMAND} --${opt}=status -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
+ )
+ # - `WARNING` to `VERBOSE` output
+ run_cmake_command(
+ message-${opt}-verbose
+ ${CMAKE_COMMAND} --${opt}=verbose -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
+ )
+ # - `WARNING` to `DEBUG` output
+ run_cmake_command(
+ message-${opt}-debug
+ ${CMAKE_COMMAND} --${opt}=debug -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
+ )
+ # - `WARNING` to `TRACE` output
+ run_cmake_command(
+ message-${opt}-trace
+ ${CMAKE_COMMAND} --${opt}=trace -P ${RunCMake_SOURCE_DIR}/message-all-loglevels.cmake
+ )
+endforeach()
run_cmake_command(
message-indent