diff options
author | Juan Ramos <cmake@jpr.mozmail.com> | 2022-10-21 01:53:14 (GMT) |
---|---|---|
committer | Juan Ramos <cmake@jpr.mozmail.com> | 2022-10-21 01:53:14 (GMT) |
commit | 3c3bce133dda14a60d15eaa03edff527a53c01d4 (patch) | |
tree | 61ba8fdd12f66c12d58783aad3b2bce1c18eee32 /Tests/RunCMake/CommandLine/RunCMakeTest.cmake | |
parent | f4995637a78dbc6c08b7472f55bb84936c9c4ab0 (diff) | |
download | CMake-3c3bce133dda14a60d15eaa03edff527a53c01d4.zip CMake-3c3bce133dda14a60d15eaa03edff527a53c01d4.tar.gz CMake-3c3bce133dda14a60d15eaa03edff527a53c01d4.tar.bz2 |
cmake: Honor CMAKE_GENERATOR env var in --help output
Diffstat (limited to 'Tests/RunCMake/CommandLine/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 50b1f90..327b772 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -349,6 +349,13 @@ function(run_EnvironmentGenerator) run_cmake_command(Envgen-bad ${CMAKE_COMMAND} -G) unset(ENV{CMAKE_GENERATOR}) + # Honor CMAKE_GENERATOR env var in --help output + set(ENV{CMAKE_GENERATOR} "Ninja Multi-Config") + run_cmake_command(Envgen-ninja-multi-help ${CMAKE_COMMAND} --help) + set(ENV{CMAKE_GENERATOR} "NoSuchGenerator") + run_cmake_command(Envgen-bad-help ${CMAKE_COMMAND} --help) + unset(ENV{CMAKE_GENERATOR}) + if(RunCMake_GENERATOR MATCHES "Visual Studio.*") set(ENV{CMAKE_GENERATOR} "${RunCMake_GENERATOR}") run_cmake_command(Envgen ${CMAKE_COMMAND} ${source_dir}) |