diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmFileCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 38 | ||||
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 20 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 24 | ||||
-rw-r--r-- | Source/cmMakefile.h | 1 | ||||
-rw-r--r-- | Source/cmPolicies.cxx | 5 | ||||
-rw-r--r-- | Source/cmPolicies.h | 1 | ||||
-rw-r--r-- | Source/cmcmd.cxx | 28 |
10 files changed, 115 insertions, 8 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 731e592..301eff0 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MINOR 8) set(CMake_VERSION_PATCH 12) -set(CMake_VERSION_TWEAK 20140121) +set(CMake_VERSION_TWEAK 20140127) #set(CMake_VERSION_RC 1) diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 311763b..e79bc6c 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2983,6 +2983,8 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args) << " for file: [" << file << "]" << std::endl << " expected hash: [" << expectedHash << "]" << std::endl << " actual hash: [" << actualHash << "]" << std::endl + << " status: [" << (int)res << ";\"" + << ::curl_easy_strerror(res) << "\"]" << std::endl ; this->SetError(oss.str().c_str()); return false; diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 8a7eee4..03486d8 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -748,7 +748,12 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf, { std::string compilerIdVar = "CMAKE_" + lang + "_COMPILER_ID"; const char* compilerId = mf->GetDefinition(compilerIdVar.c_str()); - if(compilerId && strcmp(compilerId, "AppleClang") == 0) + if(!compilerId) + { + return; + } + + if(strcmp(compilerId, "AppleClang") == 0) { cmPolicies* policies = this->CMakeInstance->GetPolicies(); switch(mf->GetPolicyStatus(cmPolicies::CMP0025)) @@ -778,6 +783,37 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf, break; } } + + if(strcmp(compilerId, "QCC") == 0) + { + cmPolicies* policies = this->CMakeInstance->GetPolicies(); + switch(mf->GetPolicyStatus(cmPolicies::CMP0047)) + { + case cmPolicies::WARN: + if(!this->CMakeInstance->GetIsInTryCompile()) + { + cmOStringStream w; + w << policies->GetPolicyWarning(cmPolicies::CMP0047) << "\n" + "Converting " << lang << + " compiler id \"QCC\" to \"GNU\" for compatibility." + ; + mf->IssueMessage(cmake::AUTHOR_WARNING, w.str()); + } + case cmPolicies::OLD: + // OLD behavior is to convert QCC to GNU. + mf->AddDefinition(compilerIdVar.c_str(), "GNU"); + break; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + mf->IssueMessage( + cmake::FATAL_ERROR, + policies->GetRequiredPolicyError(cmPolicies::CMP0047) + ); + case cmPolicies::NEW: + // NEW behavior is to keep QCC. + break; + } + } } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 5e1f1ed..731bc00 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1110,16 +1110,24 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) /*restat=*/ false, /*generator=*/ true); + cmLocalNinjaGenerator *ng = static_cast<cmLocalNinjaGenerator *>(lg); + cmNinjaDeps implicitDeps; - for (std::vector<cmLocalGenerator *>::const_iterator i = - this->LocalGenerators.begin(); i != this->LocalGenerators.end(); ++i) { - const std::vector<std::string>& lf = (*i)->GetMakefile()->GetListFiles(); - implicitDeps.insert(implicitDeps.end(), lf.begin(), lf.end()); - } + for(std::vector<cmLocalGenerator*>::const_iterator i = + this->LocalGenerators.begin(); i != this->LocalGenerators.end(); ++i) + { + std::vector<std::string> const& lf = (*i)->GetMakefile()->GetListFiles(); + for(std::vector<std::string>::const_iterator fi = lf.begin(); + fi != lf.end(); ++fi) + { + implicitDeps.push_back(ng->ConvertToNinjaPath(fi->c_str())); + } + } + implicitDeps.push_back("CMakeCache.txt"); + std::sort(implicitDeps.begin(), implicitDeps.end()); implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()), implicitDeps.end()); - implicitDeps.push_back("CMakeCache.txt"); this->WriteBuild(os, "Re-run CMake if any of its inputs changed.", diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index bd910e2..c13b8ee 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -114,6 +114,8 @@ void cmLocalGenerator::Configure() } } + this->Makefile->AddCMakeDependFilesFromUser(); + // Check whether relative paths should be used for optionally // relative paths. this->UseRelativePaths = this->Makefile->IsOn("CMAKE_USE_RELATIVE_PATHS"); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 222cdb6..856462e 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3913,6 +3913,30 @@ cmTest* cmMakefile::GetTest(const char* testName) const return 0; } +void cmMakefile::AddCMakeDependFilesFromUser() +{ + std::vector<std::string> deps; + if(const char* deps_str = this->GetProperty("CMAKE_CONFIGURE_DEPENDS")) + { + cmSystemTools::ExpandListArgument(deps_str, deps); + } + for(std::vector<std::string>::iterator i = deps.begin(); + i != deps.end(); ++i) + { + if(cmSystemTools::FileIsFullPath(i->c_str())) + { + this->AddCMakeDependFile(*i); + } + else + { + std::string f = this->GetCurrentDirectory(); + f += "/"; + f += *i; + this->AddCMakeDependFile(f); + } + } +} + std::string cmMakefile::GetListFileStack() { cmOStringStream tmp; diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 0232ffe..dadf7ff 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -650,6 +650,7 @@ public: ///! When the file changes cmake will be re-run from the build system. void AddCMakeDependFile(const std::string& file) { this->ListFiles.push_back(file);} + void AddCMakeDependFilesFromUser(); /** * Get the list file stack as a string diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 020a782..a1451f1 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -336,6 +336,11 @@ cmPolicies::cmPolicies() CMP0046, "CMP0046", "Error on non-existent dependency in add_dependencies.", 3,0,0,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0047, "CMP0047", + "Use QCC compiler id for the qcc drivers on QNX.", + 3,0,0,0, cmPolicies::WARN); } cmPolicies::~cmPolicies() diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 38f47f1..d1bba7b 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -100,6 +100,7 @@ public: CMP0044, ///< Case sensitive <LANG>_COMPILER_ID generator expressions CMP0045, ///< Error on non-existent target in get_target_property CMP0046, ///< Error on non-existent dependency in add_dependencies + CMP0047, ///< Use QCC compiler id for the qcc drivers on QNX. /** \brief Always the last entry. * diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index c1576c4..4ac1986 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -71,6 +71,7 @@ void CMakeCommandUsage(const char* program) "(on one volume)\n" << " tar [cxt][vfz][cvfj] file.tar [file/dir1 file/dir2 ...]\n" << " - create or extract a tar or zip archive\n" + << " sleep <number>... - sleep for given number of seconds\n" << " time command [args] ... - run command and return elapsed time\n" << " touch file - touch a file.\n" << " touch_nocreate file - touch a file but do not create it.\n" @@ -279,6 +280,33 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) return 0; } + // Sleep command + else if (args[1] == "sleep" && args.size() > 2) + { + double total = 0; + for(size_t i = 2; i < args.size(); ++i) + { + double num = 0.0; + char unit; + char extra; + int n = sscanf(args[i].c_str(), "%lg%c%c", &num, &unit, &extra); + if((n == 1 || (n == 2 && unit == 's')) && num >= 0) + { + total += num; + } + else + { + std::cerr << "Unknown sleep time format \"" << args[i] << "\".\n"; + return 1; + } + } + if(total > 0) + { + cmSystemTools::Delay(static_cast<unsigned int>(total*1000)); + } + return 0; + } + // Clock command else if (args[1] == "time" && args.size() > 2) { |