diff options
author | Brad King <brad.king@kitware.com> | 2014-12-05 09:55:49 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-12-05 09:55:49 -0500 |
commit | 644b4688d71cc52f8499d6103495de0909319557 (patch) | |
tree | 86102a74cc0b93a2b4915089952458d666beb61e /Source/cmMakefileLibraryTargetGenerator.cxx | |
parent | 8a4c6d2d2e66d210e5c2d59c86b3f1bff2582867 (diff) | |
download | cmake-644b4688d71cc52f8499d6103495de0909319557.tar.gz |
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.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 80473f6131..305d81d7b7 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); |