summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-08 21:59:51 (GMT)
committerBrad King <brad.king@kitware.com>2022-03-08 22:29:12 (GMT)
commit6ab9fbd43bfce25cf9ee71a81145a1e5f9dc4a12 (patch)
tree180132890430c04a342aec84256ce5c663d3386d /Tests/RunCMake/CommandLine/RunCMakeTest.cmake
parent78adb1b952d92608e8de708084c8cdac69286616 (diff)
downloadCMake-6ab9fbd43bfce25cf9ee71a81145a1e5f9dc4a12.zip
CMake-6ab9fbd43bfce25cf9ee71a81145a1e5f9dc4a12.tar.gz
CMake-6ab9fbd43bfce25cf9ee71a81145a1e5f9dc4a12.tar.bz2
color: Add tests for CMAKE_COLOR_DIAGNOSTICS
Diffstat (limited to 'Tests/RunCMake/CommandLine/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 50815a8..ef56ded 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -416,6 +416,14 @@ function(run_EnvironmentToolchain)
endfunction()
run_EnvironmentToolchain()
+function(run_EnvironmentColor)
+ set(ENV{CMAKE_COLOR_DIAGNOSTICS} "ON")
+ run_cmake(EnvColorOn)
+ unset(ENV{CMAKE_COLOR_DIAGNOSTICS})
+ run_cmake(EnvColorDefault)
+endfunction()
+run_EnvironmentColor()
+
if(RunCMake_GENERATOR STREQUAL "Ninja")
# Use a single build tree for a few tests without cleaning.
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Build-build)