diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2018-10-31 17:26:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-11-14 20:05:06 (GMT) |
commit | 0f5c1b404b0f9cbe652cf306e9dca0c25c70876f (patch) | |
tree | 3040a94e2f7f8f9e0de4a8bd13debbe665ea997a /Tests | |
parent | ddb967cca1a37501dcf3fbd6f64c2d3be1c0c82b (diff) | |
download | CMake-0f5c1b404b0f9cbe652cf306e9dca0c25c70876f.zip CMake-0f5c1b404b0f9cbe652cf306e9dca0c25c70876f.tar.gz CMake-0f5c1b404b0f9cbe652cf306e9dca0c25c70876f.tar.bz2 |
find_package(): Add policy to remove the FindQt module
Removing FindQt.cmake gives Qt upstream a path forward to export its
own QtConfig.cmake files which can be found by find_package()
without having to explicitly specify CONFIG. Projects that still
want to use Qt3/4 can call find_package(Qt[34]), include(FindQt),
or add FindQt.cmake to their CMAKE_MODULE_PATH.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/find_package/CMP0084-NEW-stderr.txt | 20 | ||||
-rw-r--r-- | Tests/RunCMake/find_package/CMP0084-NEW.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/find_package/CMP0084-OLD.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/find_package/CMP0084-WARN-stderr.txt | 8 | ||||
-rw-r--r-- | Tests/RunCMake/find_package/CMP0084-WARN.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/find_package/RunCMakeTest.cmake | 3 |
6 files changed, 51 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_package/CMP0084-NEW-stderr.txt b/Tests/RunCMake/find_package/CMP0084-NEW-stderr.txt new file mode 100644 index 0000000..280ff8c --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0084-NEW-stderr.txt @@ -0,0 +1,20 @@ +^CMake Warning at CMP0084-NEW\.cmake:[0-9]+ \(find_package\): + No "FindQt\.cmake" found in CMAKE_MODULE_PATH\. +Call Stack \(most recent call first\): + CMakeLists\.txt:3 \(include\) ++ +CMake Warning \(dev\) at CMP0084-NEW\.cmake:[0-9]+ \(find_package\): + FindQt\.cmake must either be part of this project itself, in this case + adjust CMAKE_MODULE_PATH so that it points to the correct location inside + its source tree\. + + Or it must be installed by a package which has already been found via + find_package\(\)\. In this case make sure that package has indeed been found + and adjust CMAKE_MODULE_PATH to contain the location where that package has + installed FindQt\.cmake\. This must be a location provided by that package\. + This error in general means that the buildsystem of this project is relying + on a Find-module without ensuring that it is actually available\. + +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\.$ diff --git a/Tests/RunCMake/find_package/CMP0084-NEW.cmake b/Tests/RunCMake/find_package/CMP0084-NEW.cmake new file mode 100644 index 0000000..68fd6cf --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0084-NEW.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0084 NEW) +set(_findqt_testing TRUE) +find_package(Qt MODULE) + +if(_findqt_included) + message(FATAL_ERROR "FindQt.cmake erroneously included") +endif() diff --git a/Tests/RunCMake/find_package/CMP0084-OLD.cmake b/Tests/RunCMake/find_package/CMP0084-OLD.cmake new file mode 100644 index 0000000..7bd4726 --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0084-OLD.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0084 OLD) +set(_findqt_testing TRUE) +find_package(Qt MODULE) + +if(NOT _findqt_included) + message(FATAL_ERROR "FindQt.cmake not included") +endif() diff --git a/Tests/RunCMake/find_package/CMP0084-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0084-WARN-stderr.txt new file mode 100644 index 0000000..9ecebd3 --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0084-WARN-stderr.txt @@ -0,0 +1,8 @@ +^CMake Warning \(dev\) at CMP0084-WARN\.cmake:[0-9]+ \(find_package\): + Policy CMP0084 is not set: The FindQt module does not exist for + find_package\(\)\. Run "cmake --help-policy CMP0084" for policy details\. Use + the cmake_policy command to set the policy and suppress this warning\. + +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\.$ diff --git a/Tests/RunCMake/find_package/CMP0084-WARN.cmake b/Tests/RunCMake/find_package/CMP0084-WARN.cmake new file mode 100644 index 0000000..4ea22cb --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0084-WARN.cmake @@ -0,0 +1,6 @@ +set(_findqt_testing TRUE) +find_package(Qt MODULE) + +if(NOT _findqt_included) + message(FATAL_ERROR "FindQt.cmake not included") +endif() diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake index c068402..e9f3558 100644 --- a/Tests/RunCMake/find_package/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake @@ -23,3 +23,6 @@ run_cmake(PolicyPop) run_cmake(SetFoundFALSE) run_cmake(WrongVersion) run_cmake(WrongVersionConfig) +run_cmake(CMP0084-OLD) +run_cmake(CMP0084-WARN) +run_cmake(CMP0084-NEW) |