summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/Checks/cm_cxx_features.cmake3
-rw-r--r--Source/cmGeneratorExpressionEvaluationFile.cxx6
-rw-r--r--Source/cmMakefile.cxx3
-rw-r--r--Source/cmNinjaTargetGenerator.cxx4
4 files changed, 14 insertions, 2 deletions
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 2704c40..2a1abba 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -19,6 +19,9 @@ function(cm_check_cxx_feature name)
string(REGEX REPLACE " +0 Warning\\(s\\)" "" check_output "${check_output}")
# Filter out warnings caused by user flags.
string(REGEX REPLACE "[^\n]*warning:[^\n]*-Winvalid-command-line-argument[^\n]*" "" check_output "${check_output}")
+ # Filter out warnings caused by local configuration.
+ string(REGEX REPLACE "[^\n]*warning:[^\n]*directory not found for option[^\n]*" "" check_output "${check_output}")
+ string(REGEX REPLACE "[^\n]*warning:[^\n]*object file compiled with -mlong-branch which is no longer needed[^\n]*" "" check_output "${check_output}")
# If using the feature causes warnings, treat it as broken/unavailable.
if(check_output MATCHES "[Ww]arning")
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx
index c544141..99b9261 100644
--- a/Source/cmGeneratorExpressionEvaluationFile.cxx
+++ b/Source/cmGeneratorExpressionEvaluationFile.cxx
@@ -105,8 +105,14 @@ void cmGeneratorExpressionEvaluationFile::CreateOutputFile(
lg, config, false, nullptr, nullptr, nullptr, le);
cmSourceFile* sf = lg->GetMakefile()->GetOrCreateSource(
name, false, cmSourceFileLocationKind::Known);
+ // Tell TraceDependencies that the file is not expected to exist
+ // on disk yet. We generate it after that runs.
sf->SetProperty("GENERATED", "1");
+ // Tell the build system generators that there is no build rule
+ // to generate the file.
+ sf->SetProperty("__CMAKE_GENERATED_BY_CMAKE", "1");
+
gg->SetFilenameTargetDepends(
sf, this->OutputFileExpr->GetSourceSensitiveTargets());
}
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 71359a2..604ca2c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2304,7 +2304,8 @@ bool cmMakefile::CanIWriteThisFile(std::string const& fileName) const
}
return !cmSystemTools::IsSubDirectory(fileName, this->GetHomeDirectory()) ||
- cmSystemTools::IsSubDirectory(fileName, this->GetHomeOutputDirectory());
+ cmSystemTools::IsSubDirectory(fileName, this->GetHomeOutputDirectory()) ||
+ cmSystemTools::SameFile(fileName, this->GetHomeOutputDirectory());
}
const char* cmMakefile::GetRequiredDefinition(const std::string& name) const
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index f4faf47..a6a3efb 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -896,7 +896,9 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
// (either attached to this source file or another one), assume that one of
// the target dependencies, OBJECT_DEPENDS or header file custom commands
// will rebuild the file.
- if (source->GetPropertyAsBool("GENERATED") && !source->GetCustomCommand() &&
+ if (source->GetPropertyAsBool("GENERATED") &&
+ !source->GetPropertyAsBool("__CMAKE_GENERATED_BY_CMAKE") &&
+ !source->GetCustomCommand() &&
!this->GetGlobalGenerator()->HasCustomCommandOutput(sourceFileName)) {
this->GetGlobalGenerator()->AddAssumedSourceDependencies(sourceFileName,
orderOnlyDeps);