summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-08 18:33:08 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-08 18:33:08 (GMT)
commit99e432508eabcfd5ce42ffd9a88029332d178cc2 (patch)
treecbfb570c3e23b3de0fbb441fac27b951d9874e81 /Source/cmTarget.cxx
parent173448d9886deccb7cadd4fd0ffeaa236fa66e49 (diff)
downloadCMake-99e432508eabcfd5ce42ffd9a88029332d178cc2.zip
CMake-99e432508eabcfd5ce42ffd9a88029332d178cc2.tar.gz
CMake-99e432508eabcfd5ce42ffd9a88029332d178cc2.tar.bz2
BUG: Use link language for target name computation
The commit "Do not compute link language for LOCATION" was wrong. The variables CMAKE_STATIC_LIBRARY_PREFIX_Java CMAKE_STATIC_LIBRARY_SUFFIX_Java are used for building Java .jar files. This commit re-enables the feature and documents the variables: CMAKE_EXECUTABLE_SUFFIX_<LANG> CMAKE_IMPORT_LIBRARY_PREFIX_<LANG> CMAKE_IMPORT_LIBRARY_SUFFIX_<LANG> CMAKE_SHARED_LIBRARY_PREFIX_<LANG> CMAKE_SHARED_LIBRARY_SUFFIX_<LANG> CMAKE_SHARED_MODULE_PREFIX_<LANG> CMAKE_SHARED_MODULE_SUFFIX_<LANG> CMAKE_STATIC_LIBRARY_PREFIX_<LANG> CMAKE_STATIC_LIBRARY_SUFFIX_<LANG> Instead of making separate, repetitive entries for the _<LANG> variable documentation, we just mention the per-language name in the text of the platform-wide variable documentation. Internally we keep undocumented definitions of these properties to satisfy CMAKE_STRICT mode.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 32c1688..6c9197c 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2709,6 +2709,21 @@ void cmTarget::GetFullNameInternal(const char* config,
const char* prefixVar = this->GetPrefixVariableInternal(implib);
const char* suffixVar = this->GetSuffixVariableInternal(implib);
+ // Check for language-specific default prefix and suffix.
+ if(const char* ll = this->GetLinkerLanguage(config))
+ {
+ if(!targetSuffix && suffixVar && *suffixVar)
+ {
+ std::string langSuff = suffixVar + std::string("_") + ll;
+ targetSuffix = this->Makefile->GetDefinition(langSuff.c_str());
+ }
+ if(!targetPrefix && prefixVar && *prefixVar)
+ {
+ std::string langPrefix = prefixVar + std::string("_") + ll;
+ targetPrefix = this->Makefile->GetDefinition(langPrefix.c_str());
+ }
+ }
+
// if there is no prefix on the target use the cmake definition
if(!targetPrefix && prefixVar)
{