summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/cmGeneratorTarget.cxx3
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
-rw-r--r--Source/cmLocalGenerator.cxx2
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx12
-rw-r--r--Source/cmQtAutoGenInitializer.cxx47
-rw-r--r--Source/cmQtAutoMocUic.cxx4
7 files changed, 62 insertions, 16 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 17b38cf0e..3fe6f3a97 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 18)
-set(CMake_VERSION_PATCH 1)
+set(CMake_VERSION_PATCH 2)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
@@ -21,7 +21,7 @@ endif()
if(NOT CMake_VERSION_NO_GIT)
# If this source was exported by 'git archive', use its commit info.
- set(git_info [==[63a65baf4c CMake 3.18.1]==])
+ set(git_info [==[aaa5eab410 CMake 3.18.2]==])
# Otherwise, try to identify the current development source version.
if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index c7baf2b71..ab6a26c97 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3032,6 +3032,9 @@ std::string cmGeneratorTarget::GetCompilePDBDirectory(
void cmGeneratorTarget::GetAppleArchs(const std::string& config,
std::vector<std::string>& archVec) const
{
+ if (!this->Makefile->IsOn("APPLE")) {
+ return;
+ }
cmProp archs = nullptr;
if (!config.empty()) {
std::string defVarName =
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index f0737e80f..b28395a56 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3158,6 +3158,12 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
std::string symroot = cmStrCat(root->GetCurrentBinaryDirectory(), "/build");
buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot));
+ // Inside a try_compile project, do not require signing on any platform.
+ if (this->CMakeInstance->GetIsInTryCompile()) {
+ buildSettings->AddAttribute("CODE_SIGNING_ALLOWED",
+ this->CreateString("NO"));
+ }
+
for (auto& config : configs) {
cmXCodeObject* buildSettingsForCfg = this->CreateFlatClone(buildSettings);
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index e26dc94e6..c15ca7c0e 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2789,7 +2789,7 @@ void cmLocalGenerator::CopyPchCompilePdb(
}
file << " break()\n"
<< " endif()\n";
- file << " else()\n"
+ file << " elseif(NOT EXISTS \"" << from_file << "\")\n"
<< " execute_process(COMMAND ${CMAKE_COMMAND}"
<< " -E sleep 1)\n"
<< " endif()\n";
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 0f01f85c7..32ab9f80e 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -733,12 +733,8 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement(
static_cast<int>(cmSystemTools::CalculateCommandLineLengthLimit()) -
globalGen->GetRuleCmdLength(this->LanguageLinkerDeviceRule(config));
- std::string path = localGen.GetHomeRelativeOutputPath();
- if (!path.empty()) {
- path += '/';
- }
build.RspFile = this->ConvertToNinjaPath(
- cmStrCat(path, "CMakeFiles/", genTarget->GetName(),
+ cmStrCat("CMakeFiles/", genTarget->GetName(),
globalGen->IsMultiConfig() ? cmStrCat('.', config) : "", ".rsp"));
// Gather order-only dependencies.
@@ -1159,12 +1155,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
globalGen->GetRuleCmdLength(linkBuild.Rule);
}
- std::string path = localGen.GetHomeRelativeOutputPath();
- if (!path.empty()) {
- path += '/';
- }
linkBuild.RspFile = this->ConvertToNinjaPath(
- cmStrCat(path, "CMakeFiles/", gt->GetName(),
+ cmStrCat("CMakeFiles/", gt->GetName(),
globalGen->IsMultiConfig() ? cmStrCat('.', config) : "", ".rsp"));
// Gather order-only dependencies.
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 511a018fb..1132852bc 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -1182,11 +1182,54 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
if (useNinjaDepfile) {
// Create a custom command that generates a timestamp file and
// has a depfile assigned. The depfile is created by JobDepFilesMergeT.
-
- // Add additional autogen target dependencies
+ //
+ // Also create an additional '_autogen_timestamp_deps' that the custom
+ // command will depend on. It will have no sources or commands to
+ // execute, but it will have dependencies that would originally be
+ // assigned to the pre-Qt 5.15 'autogen' target. These dependencies will
+ // serve as a list of order-only dependencies for the custom command,
+ // without forcing the custom command to re-execute.
+ //
+ // The dependency tree would then look like
+ // '_autogen_timestamp_deps (order-only)' <- '/timestamp' file <-
+ // '_autogen' target.
+ const auto timestampTargetName =
+ cmStrCat(this->GenTarget->GetName(), "_autogen_timestamp_deps");
+ std::vector<std::string> timestampTargetProvides;
+ cmCustomCommandLines timestampTargetCommandLines;
+
+ // Add additional autogen target dependencies to
+ // '_autogen_timestamp_deps'.
for (const cmTarget* t : this->AutogenTarget.DependTargets) {
dependencies.push_back(t->GetName());
}
+
+ cmTarget* timestampTarget = this->LocalGen->AddUtilityCommand(
+ timestampTargetName, true, this->Dir.Work.c_str(),
+ /*byproducts=*/timestampTargetProvides,
+ /*depends=*/dependencies, timestampTargetCommandLines, false, nullptr);
+ this->LocalGen->AddGeneratorTarget(
+ cm::make_unique<cmGeneratorTarget>(timestampTarget, this->LocalGen));
+
+ // Set FOLDER property on the timestamp target, so it appears in the
+ // appropriate folder in an IDE or in the file api.
+ if (!this->TargetsFolder.empty()) {
+ timestampTarget->SetProperty("FOLDER", this->TargetsFolder);
+ }
+
+ // Make '/timestamp' file depend on '_autogen_timestamp_deps' and on the
+ // moc and uic executables (whichever are enabled).
+ dependencies.clear();
+ dependencies.push_back(timestampTargetName);
+
+ if (this->Moc.ExecutableTarget != nullptr) {
+ dependencies.push_back(this->Moc.ExecutableTarget->Target->GetName());
+ }
+ if (this->Uic.ExecutableTarget != nullptr) {
+ dependencies.push_back(this->Uic.ExecutableTarget->Target->GetName());
+ }
+
+ // Create the custom command that outputs the timestamp file.
const char timestampFileName[] = "timestamp";
const std::string outputFile =
cmStrCat(this->Dir.Build, "/", timestampFileName);
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx
index 9adcabb80..f6cccfbee 100644
--- a/Source/cmQtAutoMocUic.cxx
+++ b/Source/cmQtAutoMocUic.cxx
@@ -2163,7 +2163,9 @@ std::string escapeDependencyPath(cm::string_view path)
void cmQtAutoMocUicT::JobDepFilesMergeT::Process()
{
if (Log().Verbose()) {
- Log().Info(GenT::MOC, "Merging MOC dependencies");
+ Log().Info(GenT::MOC,
+ cmStrCat("Merging MOC dependencies into ",
+ MessagePath(BaseConst().DepFile.c_str())));
}
auto processDepFile =
[](const std::string& mocOutputFile) -> std::vector<std::string> {