summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-05 14:55:49 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-05 14:55:49 (GMT)
commit644b4688d71cc52f8499d6103495de0909319557 (patch)
tree86102a74cc0b93a2b4915089952458d666beb61e /Source/cmMakefileLibraryTargetGenerator.cxx
parent8a4c6d2d2e66d210e5c2d59c86b3f1bff2582867 (diff)
downloadCMake-644b4688d71cc52f8499d6103495de0909319557.zip
CMake-644b4688d71cc52f8499d6103495de0909319557.tar.gz
CMake-644b4688d71cc52f8499d6103495de0909319557.tar.bz2
Makefile: Fix rebuild with multiple custom command outputs (#15116)
Fix the generated makefiles for custom commands with multiple outputs to list all the outputs on the left hand side of the build rule. This is much simpler and more reliable than the old multiple-output-pair infrastructure.
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx21
1 files changed, 9 insertions, 12 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 80473f6..305d81d 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -752,26 +752,23 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
this->Target);
}
- // Write the build rule.
- this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
- targetFullPathReal,
- depends, commands, false);
-
- // Some targets have more than one output file. Create rules to
- // drive the build if any extra outputs are missing.
- std::vector<std::string> extraOutputs;
+ // Compute the list of outputs.
+ std::vector<std::string> outputs(1, targetFullPathReal);
if(targetNameSO != targetNameReal)
{
- this->GenerateExtraOutput(targetFullPathSO.c_str(),
- targetFullPathReal.c_str());
+ outputs.push_back(targetFullPathSO);
}
if(targetName != targetNameSO &&
targetName != targetNameReal)
{
- this->GenerateExtraOutput(targetFullPath.c_str(),
- targetFullPathReal.c_str());
+ outputs.push_back(targetFullPath);
}
+ // Write the build rule.
+ this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
+ outputs, depends, commands, false);
+
+
// Write the main driver rule to build everything in this target.
this->WriteTargetDriverRule(targetFullPath, relink);