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 /Source/cmMakefile.cxx | |
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 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 0d42fb0..790f6e0 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3500,7 +3500,8 @@ void cmMakefile::DisplayStatus(const char* message, float s) const cm->UpdateProgress(message, s); } -std::string cmMakefile::GetModulesFile(const char* filename) const +std::string cmMakefile::GetModulesFile(const char* filename, + bool& system) const { std::string result; @@ -3547,8 +3548,10 @@ std::string cmMakefile::GetModulesFile(const char* filename) const // Normally, prefer the files found in CMAKE_MODULE_PATH. Only when the file // from which we are being called is located itself in CMAKE_ROOT, then // prefer results from CMAKE_ROOT depending on the policy setting. + system = false; result = moduleInCMakeModulePath; if (result.empty()) { + system = true; result = moduleInCMakeRoot; } @@ -3571,11 +3574,13 @@ std::string cmMakefile::GetModulesFile(const char* filename) const CM_FALLTHROUGH; } case cmPolicies::OLD: + system = false; result = moduleInCMakeModulePath; break; case cmPolicies::REQUIRED_IF_USED: case cmPolicies::REQUIRED_ALWAYS: case cmPolicies::NEW: + system = true; result = moduleInCMakeRoot; break; } |