summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2010-09-30 18:54:20 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2010-09-30 18:54:20 (GMT)
commit96a335fd8d43b1fd73de12d29c192a29eaf5231a (patch)
tree951a53f51555a4675136f1ae0991a334423a0cc9 /Source
parentd3a89432fd5d35a33ee37bca78bbc2cafa113c42 (diff)
downloadCMake-96a335fd8d43b1fd73de12d29c192a29eaf5231a.zip
CMake-96a335fd8d43b1fd73de12d29c192a29eaf5231a.tar.gz
CMake-96a335fd8d43b1fd73de12d29c192a29eaf5231a.tar.bz2
XCode generation should fail if lang isn't known
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index f989a5c..0976a4d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1424,6 +1424,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
std::string defFlags;
bool shared = ((target.GetType() == cmTarget::SHARED_LIBRARY) ||
(target.GetType() == cmTarget::MODULE_LIBRARY));
+ bool binary = ((target.GetType() == cmTarget::STATIC_LIBRARY) ||
+ (target.GetType() == cmTarget::EXECUTABLE) ||
+ shared);
const char* lang = target.GetLinkerLanguage(configName);
std::string cflags;
@@ -1442,6 +1445,13 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
// Add shared-library flags if needed.
this->CurrentLocalGenerator->AddSharedFlags(flags, lang, shared);
}
+ else if(binary)
+ {
+ cmSystemTools::Error
+ ("CMake can not determine linker language for target:",
+ target.GetName());
+ return;
+ }
// Add define flags
this->CurrentLocalGenerator->