summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CommandLine/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 03b9301..7b34773 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -459,6 +459,15 @@ elseif(RunCMake_GENERATOR MATCHES "Ninja Multi-Config|Visual Studio|Xcode")
run_EnvironmentConfigTypes()
endif()
+function(run_EnvironmentInstallPrefix)
+ set(ENV{CMAKE_INSTALL_PREFIX} "${RunCMake_BINARY_DIR}/install_prefix_set_via_env_var")
+ run_cmake(EnvInstallPrefix)
+ run_cmake_with_options(EnvInstallPrefixOverrideWithVar -DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/install_prefix_set_via_var)
+ run_cmake_with_options(EnvInstallPrefixOverrideWithCmdLineOpt --install-prefix ${RunCMake_BINARY_DIR}/install_prefix_set_cmd_line_opt)
+ unset(ENV{CMAKE_INSTALL_PREFIX})
+endfunction()
+run_EnvironmentInstallPrefix()
+
function(run_EnvironmentToolchain)
set(ENV{CMAKE_TOOLCHAIN_FILE} "${RunCMake_SOURCE_DIR}/EnvToolchain-toolchain.cmake")
run_cmake(EnvToolchainAbsolute)