CMake/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
Brad King d430cb7c36 Tests: Fix failures when running under the default install prefix (#15566)
Fix test cases whose behavior differs when their source or build tree is
under CMAKE_INSTALL_PREFIX by setting an install prefix under the build
tree.  Otherwise they may fail when run under the default install prefix
(e.g. /usr/local).
2015-05-14 10:07:37 -04:00

12 lines
328 B
CMake

include(RunCMake)
# Protect tests from running inside the default install prefix.
set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/NotDefaultPrefix")
run_cmake(CMP0041-OLD)
run_cmake(CMP0041-NEW)
run_cmake(CMP0041-WARN)
run_cmake(CMP0041-tid-OLD)
run_cmake(CMP0041-tid-NEW)
run_cmake(CMP0041-tid-WARN)