diff options
author | Brad King <brad.king@kitware.com> | 2009-03-16 16:55:53 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-03-16 16:55:53 -0400 |
commit | 49dec94f54c6c896b2d42f6bea0b36bd429693c9 (patch) | |
tree | c55f386acc4e43718167ebfaf77a460683a8e413 /Source | |
parent | 2f651c2e59d4b4fcb46ac6ad293332db99f430f3 (diff) | |
download | cmake-49dec94f54c6c896b2d42f6bea0b36bd429693c9.tar.gz |
STYLE: Separate unrelated logic
This separates unrelated uses of a library-type switch into separate
switches. An upcoming commit will conditionally enter one of the
switches.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 285a5650a2..e38a196211 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -451,18 +451,15 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules // Add the link message. std::string buildEcho = "Linking "; buildEcho += linkLanguage; - const char* forbiddenFlagVar = 0; switch(this->Target->GetType()) { case cmTarget::STATIC_LIBRARY: buildEcho += " static library "; break; case cmTarget::SHARED_LIBRARY: - forbiddenFlagVar = "_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS"; buildEcho += " shared library "; break; case cmTarget::MODULE_LIBRARY: - forbiddenFlagVar = "_CREATE_SHARED_MODULE_FORBIDDEN_FLAGS"; buildEcho += " shared module "; break; default: @@ -473,6 +470,18 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules this->LocalGenerator->AppendEcho(commands, buildEcho.c_str(), cmLocalUnixMakefileGenerator3::EchoLink); + const char* forbiddenFlagVar = 0; + switch(this->Target->GetType()) + { + case cmTarget::SHARED_LIBRARY: + forbiddenFlagVar = "_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS"; + break; + case cmTarget::MODULE_LIBRARY: + forbiddenFlagVar = "_CREATE_SHARED_MODULE_FORBIDDEN_FLAGS"; + break; + default: break; + } + // Construct a list of files associated with this library that may // need to be cleaned. std::vector<std::string> libCleanFiles; |