summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDaniel Eiband <daniel.eiband@brainlab.com>2019-09-06 17:17:37 (GMT)
committerDaniel Eiband <daniel.eiband@brainlab.com>2019-09-17 20:50:25 (GMT)
commit4926ab24542d2c9e644feee88efd4a96f8bcab97 (patch)
tree323c647356eb271a24fa7b71afea594fc63f8865 /Source
parente6ddb57479a3620c712719c120a7337a84470d21 (diff)
downloadCMake-4926ab24542d2c9e644feee88efd4a96f8bcab97.zip
CMake-4926ab24542d2c9e644feee88efd4a96f8bcab97.tar.gz
CMake-4926ab24542d2c9e644feee88efd4a96f8bcab97.tar.bz2
cmMakefile: Create all generated byproducts as known sources
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx11
-rw-r--r--Source/cmMakefile.h4
2 files changed, 7 insertions, 8 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index f35b999..564ac56 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -970,8 +970,8 @@ cmSourceFile* cmMakefile::AddCustomCommandToOutput(
}
// Always create the output sources and mark them generated.
- this->CreateGeneratedSources(outputs, cmSourceFileLocationKind::Known);
- this->CreateGeneratedSources(byproducts, cmSourceFileLocationKind::Known);
+ this->CreateGeneratedSources(outputs);
+ this->CreateGeneratedSources(byproducts);
// Choose a source file on which to store the custom command.
cmSourceFile* file = nullptr;
@@ -1239,7 +1239,7 @@ cmTarget* cmMakefile::AddUtilityCommand(
// Store the custom command in the target.
if (!commandLines.empty() || !depends.empty()) {
// Always create the byproduct sources and mark them generated.
- this->CreateGeneratedSources(byproducts, cmSourceFileLocationKind::Known);
+ this->CreateGeneratedSources(byproducts);
std::string force =
cmStrCat(this->GetCurrentBinaryDirectory(), "/CMakeFiles/", utilityName);
@@ -3444,10 +3444,11 @@ cmSourceFile* cmMakefile::GetOrCreateSource(const std::string& sourceName,
}
void cmMakefile::CreateGeneratedSources(
- const std::vector<std::string>& outputs, cmSourceFileLocationKind kind)
+ const std::vector<std::string>& outputs)
{
for (std::string const& output : outputs) {
- if (cmSourceFile* out = this->GetOrCreateSource(output, true, kind)) {
+ if (cmSourceFile* out = this->GetOrCreateSource(
+ output, true, cmSourceFileLocationKind::Known)) {
out->SetProperty("GENERATED", "1");
}
}
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 1944879..28f5452 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -1067,9 +1067,7 @@ private:
bool atOnly, const char* filename,
long line, bool replaceAt) const;
- void CreateGeneratedSources(
- const std::vector<std::string>& outputs,
- cmSourceFileLocationKind kind = cmSourceFileLocationKind::Ambiguous);
+ void CreateGeneratedSources(const std::vector<std::string>& outputs);
/**
* See LinearGetSourceFileWithOutput for background information