summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tests/CMakeInstall.cmake22
1 files changed, 4 insertions, 18 deletions
diff --git a/Tests/CMakeInstall.cmake b/Tests/CMakeInstall.cmake
index 5f814d9..fda8c54 100644
--- a/Tests/CMakeInstall.cmake
+++ b/Tests/CMakeInstall.cmake
@@ -17,29 +17,15 @@ if(CMake_TEST_INSTALL)
if(CMAKE_CONFIGURATION_TYPES)
# There are multiple configurations. Make sure the tested
# configuration is the one that is installed.
- set(CMake_TEST_INSTALL_CONFIG -C "\${CTEST_CONFIGURATION_TYPE}")
+ set(CMake_TEST_INSTALL_CONFIG --config $<CONFIGURATION>)
else()
set(CMake_TEST_INSTALL_CONFIG)
endif()
- # The CTest of the CMake used to build this CMake.
- if(CMAKE_CTEST_COMMAND)
- set(CMake_TEST_INSTALL_CTest ${CMAKE_CTEST_COMMAND})
- else()
- set(CMake_TEST_INSTALL_CTest ${CMake_BIN_DIR}/ctest)
- endif()
-
# Add a test to install CMake through the build system install target.
- add_test(CMake.Install
- ${CMake_TEST_INSTALL_CTest}
- ${CMake_TEST_INSTALL_CONFIG}
- --build-and-test ${CMake_SOURCE_DIR} ${CMake_BINARY_DIR}
- --build-generator ${CMAKE_GENERATOR} # Not CMAKE_TEST_GENERATOR
- --build-project CMake
- --build-makeprogram ${CMAKE_MAKE_PROGRAM} # Not CMAKE_TEST_MAKEPROGRAM
- --build-nocmake
- --build-noclean
- --build-target install)
+ add_test(NAME CMake.Install
+ COMMAND cmake --build . --target install ${CMake_TEST_INSTALL_CONFIG}
+ )
# Avoid running this test simultaneously with other tests:
set_tests_properties(CMake.Install PROPERTIES RUN_SERIAL ON)