Просмотр исходного кода

ENH: Do not compute link language for LOCATION

The LOCATION property requires the full file name of a target to be
computed.  Previously we computed the linker language for a target to
look up variables such as CMAKE_SHARED_LIBRARY_SUFFIX_<LANG>.  This led
to locating all the source files immediately instead of delaying the
search to generation time.  In the future even more computation will be
needed to get the linker language, so it is better to avoid it.

The _<LANG> versions of these variables are undocumented, not set in any
platform file we provide, and do not produce hits in google.  This
change just removes the unused feature outright.
Brad King 16 лет назад
Родитель
Сommit
2b5d97419f
2 измененных файлов с 0 добавлено и 21 удалено
  1. 0 6
      Source/cmDocumentVariables.cxx
  2. 0 15
      Source/cmTarget.cxx

+ 0 - 6
Source/cmDocumentVariables.cxx

@@ -1245,18 +1245,12 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
                      cmProperty::VARIABLE,0,0);
   cm->DefineProperty("CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_OBJECTS",
                      cmProperty::VARIABLE,0,0);
-  cm->DefineProperty("CMAKE_EXECUTABLE_SUFFIX_<LANG>",
-                     cmProperty::VARIABLE,0,0);
   cm->DefineProperty("CMAKE_EXE_LINK_DYNAMIC_<LANG>_FLAGS",
                      cmProperty::VARIABLE,0,0);
   cm->DefineProperty("CMAKE_EXE_LINK_STATIC_<LANG>_FLAGS",
                      cmProperty::VARIABLE,0,0);
   cm->DefineProperty("CMAKE_GENERATOR_<LANG>",
                      cmProperty::VARIABLE,0,0);
-  cm->DefineProperty("CMAKE_IMPORT_LIBRARY_PREFIX_<LANG>",
-                     cmProperty::VARIABLE,0,0);
-  cm->DefineProperty("CMAKE_IMPORT_LIBRARY_SUFFIX_<LANG>",
-                     cmProperty::VARIABLE,0,0);
   cm->DefineProperty("CMAKE_INCLUDE_FLAG_<LANG>",
                      cmProperty::VARIABLE,0,0);
   cm->DefineProperty("CMAKE_INCLUDE_FLAG_SEP_<LANG>",

+ 0 - 15
Source/cmTarget.cxx

@@ -2708,21 +2708,6 @@ void cmTarget::GetFullNameInternal(const char* config,
     }
   const char* prefixVar = this->GetPrefixVariableInternal(implib);
   const char* suffixVar = this->GetSuffixVariableInternal(implib);
-  const char* ll = this->GetLinkerLanguage();
-  // first try language specific suffix
-  if(ll)
-    {
-    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)