diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/CTest/cmProcess.cxx | 3 | ||||
-rw-r--r-- | Source/cmConfigureFileCommand.cxx | 14 | ||||
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 27 | ||||
-rw-r--r-- | Source/cmFindPackageCommand.h | 3 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 7 | ||||
-rw-r--r-- | Source/cmMakefile.h | 8 | ||||
-rw-r--r-- | Source/cmPolicies.h | 5 |
8 files changed, 53 insertions, 16 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 616e7d8..eec8d1a 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181115) +set(CMake_VERSION_PATCH 20181119) #set(CMake_VERSION_RC 1) diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 39cea87..c4cf046 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -127,7 +127,8 @@ bool cmProcess::StartProcess(uv_loop_t& loop, std::vector<size_t>* affinity) uv_pipe_open(pipe_writer, fds[1]); uv_stdio_container_t stdio[3]; - stdio[0].flags = UV_IGNORE; + stdio[0].flags = UV_INHERIT_FD; + stdio[0].data.fd = 0; stdio[1].flags = UV_INHERIT_STREAM; stdio[1].data.stream = pipe_writer; stdio[2] = stdio[1]; diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index b5a639a..305262d 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -20,11 +20,8 @@ bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args, } std::string const& inFile = args[0]; - if (!cmSystemTools::FileIsFullPath(inFile)) { - this->InputFile = this->Makefile->GetCurrentSourceDirectory(); - this->InputFile += "/"; - } - this->InputFile += inFile; + this->InputFile = cmSystemTools::CollapseFullPath( + inFile, this->Makefile->GetCurrentSourceDirectory()); // If the input location is a directory, error out. if (cmSystemTools::FileIsDirectory(this->InputFile)) { @@ -39,11 +36,8 @@ bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args, } std::string const& outFile = args[1]; - if (!cmSystemTools::FileIsFullPath(outFile)) { - this->OutputFile = this->Makefile->GetCurrentBinaryDirectory(); - this->OutputFile += "/"; - } - this->OutputFile += outFile; + this->OutputFile = cmSystemTools::CollapseFullPath( + outFile, this->Makefile->GetCurrentBinaryDirectory()); // If the output location is already a directory put the file in it. if (cmSystemTools::FileIsDirectory(this->OutputFile)) { diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 97c1d7d..bf928fc 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -111,6 +111,8 @@ cmFindPackageCommand::cmFindPackageCommand() this->SortOrder = None; this->SortDirection = Asc; this->AppendSearchPathGroups(); + + this->DeprecatedFindModules["Qt"] = cmPolicies::CMP0084; } void cmFindPackageCommand::AppendSearchPathGroups() @@ -653,8 +655,31 @@ bool cmFindPackageCommand::FindModule(bool& found) std::string module = "Find"; module += this->Name; module += ".cmake"; - std::string mfile = this->Makefile->GetModulesFile(module.c_str()); + bool system = false; + std::string mfile = this->Makefile->GetModulesFile(module.c_str(), system); if (!mfile.empty()) { + if (system) { + auto it = this->DeprecatedFindModules.find(this->Name); + if (it != this->DeprecatedFindModules.end()) { + cmPolicies::PolicyStatus status = + this->Makefile->GetPolicyStatus(it->second); + switch (status) { + case cmPolicies::WARN: { + std::ostringstream e; + e << cmPolicies::GetPolicyWarning(it->second) << "\n"; + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, e.str()); + CM_FALLTHROUGH; + } + case cmPolicies::OLD: + break; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::NEW: + return true; + } + } + } + // Load the module we found, and set "<name>_FIND_MODULE" to true // while inside it. found = true; diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 48f17ef..05bad49 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -4,6 +4,7 @@ #define cmFindPackageCommand_h #include "cmConfigure.h" // IWYU pragma: keep +#include "cmPolicies.h" #include "cm_kwiml.h" #include <cstddef> @@ -148,6 +149,8 @@ private: }; std::map<std::string, OriginalDef> OriginalDefs; + std::map<std::string, cmPolicies::PolicyID> DeprecatedFindModules; + std::string Name; std::string Variable; std::string Version; 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; } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index d8176d9..aa94054 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -689,7 +689,13 @@ public: /** * Return a location of a file in cmake or custom modules directory */ - std::string GetModulesFile(const char* name) const; + std::string GetModulesFile(const char* name) const + { + bool system; + return this->GetModulesFile(name, system); + } + + std::string GetModulesFile(const char* name, bool& system) const; ///! Set/Get a property of this directory void SetProperty(const std::string& prop, const char* value); diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 52ef470..6b1314f 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -246,7 +246,10 @@ class cmMakefile; "in caller.", \ 3, 14, 0, cmPolicies::WARN) \ SELECT(POLICY, CMP0083, "Add PIE options when linking executable.", 3, 14, \ - 0, cmPolicies::WARN) + 0, cmPolicies::WARN) \ + SELECT(POLICY, CMP0084, \ + "The FindQt module does not exist for find_package().", 3, 14, 0, \ + cmPolicies::WARN) #define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1) #define CM_FOR_EACH_POLICY_ID(POLICY) \ |