summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx8
-rw-r--r--Source/cmFileAPICodemodel.cxx2
-rw-r--r--Source/cmGeneratorTarget.cxx10
-rw-r--r--Source/cmLocalGenerator.cxx10
4 files changed, 12 insertions, 18 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 153f328..7a6c50b 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -605,14 +605,6 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
cmExpandList(buildConfig, buildConfigs);
}
- // Try get configurations requested by the user explicitly
- {
- const char* const configsCstr =
- this->GetOption("CPACK_INSTALL_CMAKE_CONFIGURATIONS");
- auto configs = configsCstr ? configsCstr : std::string{};
- cmExpandList(configs, buildConfigs);
- }
-
// Remove duplicates
std::sort(buildConfigs.begin(), buildConfigs.end());
buildConfigs.erase(std::unique(buildConfigs.begin(), buildConfigs.end()),
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx
index 48561de..a12b3c9 100644
--- a/Source/cmFileAPICodemodel.cxx
+++ b/Source/cmFileAPICodemodel.cxx
@@ -875,7 +875,7 @@ CompileData Target::BuildCompileData(cmSourceFile* sf)
if (!pchSource.empty() && !sf->GetProperty("SKIP_PRECOMPILE_HEADERS")) {
std::string pchOptions;
- if (sf->GetFullPath() == pchSource) {
+ if (sf->ResolveFullPath() == pchSource) {
pchOptions =
this->GT->GetPchCreateCompileOptions(this->Config, fd.Language);
} else {
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index f235af9..c3ed9e8 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3360,14 +3360,8 @@ std::string cmGeneratorTarget::GetPchHeader(const std::string& config,
this->GetGlobalGenerator()->FindGeneratorTarget(pchReuseFrom);
}
- if (this->GetGlobalGenerator()->IsMultiConfig()) {
- filename = cmStrCat(
- generatorTarget->LocalGenerator->GetCurrentBinaryDirectory(), "/");
- } else {
- // For GCC we need to have the header file .h[xx]
- // next to the .h[xx].gch file
- filename = generatorTarget->ObjectDirectory;
- }
+ filename = cmStrCat(
+ generatorTarget->LocalGenerator->GetCurrentBinaryDirectory(), "/");
const std::map<std::string, std::string> languageToExtension = {
{ "C", ".h" },
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index cae47e0..827f55a 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2487,7 +2487,7 @@ void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target)
file << beforeInclude << "\n";
}
- file << "#include \"" << sf->GetFullPath() << "\"\n";
+ file << "#include \"" << sf->ResolveFullPath() << "\"\n";
if (afterInclude) {
file << afterInclude << "\n";
@@ -3123,6 +3123,14 @@ std::string cmLocalGenerator::GetObjectFileNameWithoutTarget(
const char* pchExtension = source.GetProperty("PCH_EXTENSION");
if (pchExtension) {
customOutputExtension = pchExtension;
+
+ // Make sure that for the CMakeFiles/<target>.dir/cmake_pch.h|xx.c|xx
+ // source file, we don't end up having
+ // CMakeFiles/<target>.dir/CMakeFiles/<target>.dir/cmake_pch.h|xx.pch
+ cmsys::RegularExpression var("(CMakeFiles/[^/]+.dir/)");
+ while (var.find(objectName)) {
+ objectName.erase(var.start(), var.end() - var.start());
+ }
}
// Remove the source extension if it is to be replaced.