mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-06 23:29:31 -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.
8 lines
132 B
CMake
8 lines
132 B
CMake
include(RunCMake)
|
|
|
|
set(RunCMake_TEST_OPTIONS -DNoProject=1)
|
|
run_cmake(BeforeProject)
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
|
|
run_cmake(NotOn)
|