diff options
author | Brad King <brad.king@kitware.com> | 2006-09-16 15:52:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-09-16 15:52:00 (GMT) |
commit | 4a3a9eb883440146f40d566065c8e6f6b35a4b55 (patch) | |
tree | 6dabef6e8b7d2d394c4b14227722c2375dd5fda3 | |
parent | 147b4ff102a5656da5146a9301ae85ba603d29b8 (diff) | |
download | CMake-4a3a9eb883440146f40d566065c8e6f6b35a4b55.zip CMake-4a3a9eb883440146f40d566065c8e6f6b35a4b55.tar.gz CMake-4a3a9eb883440146f40d566065c8e6f6b35a4b55.tar.bz2 |
BUG: Do not look for linker language unless it is needed.
-rw-r--r-- | Source/cmLocalGenerator.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 26840fb..e58b542 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1639,17 +1639,6 @@ void cmLocalGenerator const std::vector<std::string>& linkDirectories = target.GetLinkDirectories(); - // Get the language used for linking. - const char* linkLanguage = - target.GetLinkerLanguage(this->GetGlobalGenerator()); - if(!linkLanguage) - { - cmSystemTools:: - Error("CMake can not determine linker language for target:", - target.GetName()); - return; - } - // Lookup link type selection flags. const char* static_link_type_flag = 0; const char* shared_link_type_flag = 0; @@ -1663,6 +1652,17 @@ void cmLocalGenerator } if(target_type_str) { + // Get the language used for linking. + const char* linkLanguage = + target.GetLinkerLanguage(this->GetGlobalGenerator()); + + if(!linkLanguage) + { + cmSystemTools:: + Error("CMake can not determine linker language for target:", + target.GetName()); + return; + } std::string static_link_type_flag_var = "CMAKE_"; static_link_type_flag_var += target_type_str; static_link_type_flag_var += "_LINK_STATIC_"; |