diff options
author | Brad King <brad.king@kitware.com> | 2007-03-09 16:29:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-03-09 16:29:15 (GMT) |
commit | 31637efbfb958bd5f43bee5c870c501f09e76bdf (patch) | |
tree | 9a09045b4822ffcb871b19f20d34171e7329d90f /Source/cmMakefileLibraryTargetGenerator.cxx | |
parent | fb88335cdbbcaca92e228f6bd0b6dbdc83b03806 (diff) | |
download | CMake-31637efbfb958bd5f43bee5c870c501f09e76bdf.zip CMake-31637efbfb958bd5f43bee5c870c501f09e76bdf.tar.gz CMake-31637efbfb958bd5f43bee5c870c501f09e76bdf.tar.bz2 |
ENH: Added cmMakefileTargetGenerator::GenerateExtraOutput to wrap up creation of rules to drive creation of extra outputs generated as side effects of another rule. Reimplemented generation of custom command multiple output rules to use it. Reimplemented soname symlink output dependencies to use it. Now if a symlink is deleted the library will be recreated with the symlink.
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 67bc46e..7797c91 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -653,26 +653,19 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules targetFullPathReal.c_str(), depends, commands, false); - // The symlink names for the target should depend on the real target - // so if the target version changes it rebuilds and recreates the - // symlinks. - if(targetFullPathSO != targetFullPathReal) + // 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; + if(targetNameSO != targetNameReal) { - depends.clear(); - commands.clear(); - depends.push_back(targetFullPathReal.c_str()); - this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, - targetFullPathSO.c_str(), - depends, commands, false); + this->GenerateExtraOutput(targetFullPathSO.c_str(), + targetFullPathReal.c_str()); } - if(targetFullPath != targetFullPathSO) + if(targetName != targetNameSO && + targetName != targetNameReal) { - depends.clear(); - commands.clear(); - depends.push_back(targetFullPathSO.c_str()); - this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, - targetFullPath.c_str(), - depends, commands, false); + this->GenerateExtraOutput(targetFullPath.c_str(), + targetFullPathReal.c_str()); } // Write the main driver rule to build everything in this target. |