summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-04-18 03:16:35 (GMT)
committerBrad King <brad.king@kitware.com>2007-04-18 03:16:35 (GMT)
commit07b9423e7d1f821e74c945913b8b3b6c58714f19 (patch)
tree482da007d468a5289c60e9c46ef8f2d383a74664 /Source
parentfc9ceda5e7f9b721d6174793748ff32ceea15acc (diff)
downloadCMake-07b9423e7d1f821e74c945913b8b3b6c58714f19.zip
CMake-07b9423e7d1f821e74c945913b8b3b6c58714f19.tar.gz
CMake-07b9423e7d1f821e74c945913b8b3b6c58714f19.tar.bz2
BUG: Fix ComputeLinkInformation for non-linked targets. Why is it called for utility targets anyway?
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index cd7822a..a8d84e8 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1642,13 +1642,6 @@ void cmLocalGenerator
// 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;
- }
// Check whether we should use an import library for linking a target.
bool implib =
@@ -1660,6 +1653,13 @@ void cmLocalGenerator
const char* loader_flag = 0;
if(!implib && target.GetType() == cmTarget::MODULE_LIBRARY)
{
+ if(!linkLanguage)
+ {
+ cmSystemTools::
+ Error("CMake can not determine linker language for target:",
+ target.GetName());
+ return;
+ }
std::string loader_flag_var = "CMAKE_SHARED_MODULE_LOADER_";
loader_flag_var += linkLanguage;
loader_flag_var += "_FLAG";
@@ -1766,6 +1766,13 @@ void cmLocalGenerator
}
if(target_type_str)
{
+ 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_";