diff options
author | Brad King <brad.king@kitware.com> | 2023-02-27 19:13:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-02-28 13:43:45 (GMT) |
commit | 2e469212c89c8a7569cc21e271298040d8a2190c (patch) | |
tree | 0b2c72bfe77cb7502812529e430c39e1f1bb5971 /Modules/Dart.cmake | |
parent | 6dd2948b4b7801ab66660d905d795913db034b25 (diff) | |
download | CMake-2e469212c89c8a7569cc21e271298040d8a2190c.zip CMake-2e469212c89c8a7569cc21e271298040d8a2190c.tar.gz CMake-2e469212c89c8a7569cc21e271298040d8a2190c.tar.bz2 |
Dart,FindDart: Add policy to remove these modules
These modules and the "DART" tool they support have long been replaced
by CTest.
Diffstat (limited to 'Modules/Dart.cmake')
-rw-r--r-- | Modules/Dart.cmake | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Modules/Dart.cmake b/Modules/Dart.cmake index 154fe9d..3610012 100644 --- a/Modules/Dart.cmake +++ b/Modules/Dart.cmake @@ -5,6 +5,11 @@ Dart ---- +.. deprecated:: 3.27 + This module is available only if policy :policy:`CMP0145` + is not set to ``NEW``. Do not use it in new code. + Use the :module:`CTest` module instead. + Configure a project for testing with CTest or old Dart Tcl Client This file is the backwards-compatibility version of the CTest module. @@ -33,10 +38,24 @@ whether testing support should be enabled. The default is ON. # # +# include(Dart) already warns about CMP0145, but back when this module was in +# common use, it was often loaded via include(${CMAKE_ROOT}/Modules/Dart.cmake) +# which will not warn. Warn again just in case. +cmake_policy(GET CMP0145 cmp0145) +if(cmp0145 STREQUAL "") + cmake_policy(GET_WARNING CMP0145 _cmp0145_warning) + message(AUTHOR_WARNING "${_cmp0145_warning}") +endif() + option(BUILD_TESTING "Build the testing tree." ON) if(BUILD_TESTING) + # We only get here if a project already ran include(Dart), + # so avoid warning about CMP0145 again. + cmake_policy(PUSH) + cmake_policy(SET CMP0145 OLD) find_package(Dart QUIET) + cmake_policy(POP) # # Section #1: |