diff options
author | Brad King <brad.king@kitware.com> | 2009-10-21 17:09:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-21 17:09:55 (GMT) |
commit | 3c326476ee63b91a2a240641da7e405d3e770bb3 (patch) | |
tree | 1e66d40d9af36a089104c5094009c48e87cf24c5 /Source/cmInstallTargetGenerator.cxx | |
parent | e4897a78b9a325537117a57243c65d82774694fc (diff) | |
download | CMake-3c326476ee63b91a2a240641da7e405d3e770bb3.zip CMake-3c326476ee63b91a2a240641da7e405d3e770bb3.tar.gz CMake-3c326476ee63b91a2a240641da7e405d3e770bb3.tar.bz2 |
Simplify 'strip' and 'ranlib' install tweak code
The cmInstallTargetGenerator methods AddStripRule and AddRanlibRule do
not need the target type argument. They can simply use the type of the
target for which the generator instance was created.
Diffstat (limited to 'Source/cmInstallTargetGenerator.cxx')
-rw-r--r-- | Source/cmInstallTargetGenerator.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index e4bd7a4..42b425a 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -315,8 +315,8 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, cmOStringStream tw; this->AddInstallNamePatchRule(tw, indent.Next(), config, toDestDirPath); this->AddChrpathPatchRule(tw, indent.Next(), config, toDestDirPath); - this->AddRanlibRule(tw, indent.Next(), type, toDestDirPath); - this->AddStripRule(tw, indent.Next(), type, toDestDirPath); + this->AddRanlibRule(tw, indent.Next(), toDestDirPath); + this->AddStripRule(tw, indent.Next(), toDestDirPath); std::string tws = tw.str(); // Add the rules, if any. @@ -599,13 +599,12 @@ cmInstallTargetGenerator void cmInstallTargetGenerator::AddStripRule(std::ostream& os, Indent const& indent, - cmTarget::TargetType type, const std::string& toDestDirPath) { // don't strip static libraries, because it removes the only symbol table // they have so you can't link to them anymore - if(type == cmTarget::STATIC_LIBRARY) + if(this->Target->GetType() == cmTarget::STATIC_LIBRARY) { return; } @@ -633,11 +632,10 @@ cmInstallTargetGenerator::AddStripRule(std::ostream& os, void cmInstallTargetGenerator::AddRanlibRule(std::ostream& os, Indent const& indent, - cmTarget::TargetType type, const std::string& toDestDirPath) { // Static libraries need ranlib on this platform. - if(type != cmTarget::STATIC_LIBRARY) + if(this->Target->GetType() != cmTarget::STATIC_LIBRARY) { return; } |