summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx14
-rw-r--r--Source/cmInstallCommand.cxx45
3 files changed, 34 insertions, 27 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index a0462a4..1057aea 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 19)
-set(CMake_VERSION_PATCH 20201009)
+set(CMake_VERSION_PATCH 20201013)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 6b9a0f3..985f430 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -2532,14 +2532,14 @@ bool cmGlobalNinjaMultiGenerator::OpenBuildFileStreams()
return false;
}
- if (!this->DefaultFileConfig.empty()) {
- if (!this->OpenFileStream(this->DefaultFileStream, NINJA_BUILD_FILE)) {
- return false;
- }
- *this->DefaultFileStream
- << "# Build using rules for '" << this->DefaultFileConfig << "'.\n\n"
- << "include " << GetNinjaImplFilename(this->DefaultFileConfig) << "\n\n";
+ if (!this->OpenFileStream(this->DefaultFileStream, NINJA_BUILD_FILE)) {
+ return false;
}
+ *this->DefaultFileStream << "# Build using rules for '"
+ << this->DefaultFileConfig << "'.\n\n"
+ << "include "
+ << GetNinjaImplFilename(this->DefaultFileConfig)
+ << "\n\n";
// Write a comment about this file.
*this->CommonFileStream
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 83609e2..b99e6a3 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -461,6 +461,27 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
std::unique_ptr<cmInstallFilesGenerator> publicHeaderGenerator;
std::unique_ptr<cmInstallFilesGenerator> resourceGenerator;
+ auto addTargetExport = [&]() {
+ // Add this install rule to an export if one was specified.
+ if (!exports.empty()) {
+ auto te = cm::make_unique<cmTargetExport>();
+ te->TargetName = target.GetName();
+ te->ArchiveGenerator = archiveGenerator.get();
+ te->BundleGenerator = bundleGenerator.get();
+ te->FrameworkGenerator = frameworkGenerator.get();
+ te->HeaderGenerator = publicHeaderGenerator.get();
+ te->LibraryGenerator = libraryGenerator.get();
+ te->RuntimeGenerator = runtimeGenerator.get();
+ te->ObjectsGenerator = objectGenerator.get();
+ te->InterfaceIncludeDirectories =
+ cmJoin(includesArgs.GetIncludeDirs(), ";");
+
+ helper.Makefile->GetGlobalGenerator()
+ ->GetExportSets()[exports]
+ .AddTargetExport(std::move(te));
+ }
+ };
+
// Avoid selecting default destinations for PUBLIC_HEADER and
// PRIVATE_HEADER if any artifacts are specified.
bool artifactsSpecified = false;
@@ -476,6 +497,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
if (target.IsDLLPlatform()) {
// When in namelink only mode skip all libraries on Windows.
if (namelinkMode == cmInstallTargetGenerator::NamelinkModeOnly) {
+ addTargetExport();
continue;
}
@@ -507,6 +529,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
if (target.IsFrameworkOnApple()) {
// When in namelink only mode skip frameworks.
if (namelinkMode == cmInstallTargetGenerator::NamelinkModeOnly) {
+ addTargetExport();
continue;
}
@@ -551,6 +574,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
if (target.IsFrameworkOnApple()) {
// When in namelink only mode skip frameworks.
if (namelinkMode == cmInstallTargetGenerator::NamelinkModeOnly) {
+ addTargetExport();
continue;
}
@@ -744,25 +768,8 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
}
}
- // Add this install rule to an export if one was specified and
- // this is not a namelink-only rule.
- if (!exports.empty() && !namelinkOnly) {
- auto te = cm::make_unique<cmTargetExport>();
- te->TargetName = target.GetName();
- te->ArchiveGenerator = archiveGenerator.get();
- te->BundleGenerator = bundleGenerator.get();
- te->FrameworkGenerator = frameworkGenerator.get();
- te->HeaderGenerator = publicHeaderGenerator.get();
- te->LibraryGenerator = libraryGenerator.get();
- te->RuntimeGenerator = runtimeGenerator.get();
- te->ObjectsGenerator = objectGenerator.get();
- te->InterfaceIncludeDirectories =
- cmJoin(includesArgs.GetIncludeDirs(), ";");
-
- helper.Makefile->GetGlobalGenerator()
- ->GetExportSets()[exports]
- .AddTargetExport(std::move(te));
- }
+ // Add this install rule to an export if one was specified.
+ addTargetExport();
// Keep track of whether we're installing anything in each category
installsArchive = installsArchive || archiveGenerator;