mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 06:40:48 -06:00
Revert commit v3.8.0-rc1~305^2 (Remove CTestTestfile.cmake when BUILD_TESTING is OFF, 2016-11-14) again. We reverted it once in commit v3.8.0-rc3~22^2 (Revert "Remove CTestTestfile.cmake when BUILD_TESTING is OFF", 2017-03-06) but it was accidentally restored by commit v3.11.0-rc1~387^2 (server: add "ctestInfo" request to get test info, 2017-10-25), perhaps due to conflict resolution during rebase. We cannot remove `CTestTestfile.cmake` when testing is off because it breaks projects that never enable testing but create their own `CTestTestfile.cmake` manually instead. Revert the change again and add a test case.
4 lines
134 B
CMake
4 lines
134 B
CMake
set(BUILD_TESTING OFF CACHE BOOL "Build the testing tree.")
|
|
include(CTest)
|
|
configure_file(CTestTestfile.cmake.in CTestTestfile.cmake)
|