[Cmake-commits] [cmake-commits] king committed cmDocumentVariables.cxx 1.36 1.37 cmTarget.cxx 1.259 1.260

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jul 8 14:33:10 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv31662/Source

Modified Files:
	cmDocumentVariables.cxx cmTarget.cxx 
Log Message:
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.


Index: cmDocumentVariables.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentVariables.cxx,v
retrieving revision 1.36
retrieving revision 1.37
diff -C 2 -d -r1.36 -r1.37
*** cmDocumentVariables.cxx	8 Jul 2009 17:03:22 -0000	1.36
--- cmDocumentVariables.cxx	8 Jul 2009 18:33:08 -0000	1.37
***************
*** 204,209 ****
       "The suffix for executables on this platform.",
       "The suffix to use for the end of an executable if any, "
!      ".exe on Windows.",false,
!      "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_MAJOR_VERSION", cmProperty::VARIABLE,
--- 204,211 ----
       "The suffix for executables on this platform.",
       "The suffix to use for the end of an executable if any, "
!      ".exe on Windows."
!      "\n"
!      "CMAKE_EXECUTABLE_SUFFIX_<LANG> overrides this for language <LANG>."
!      ,false, "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_MAJOR_VERSION", cmProperty::VARIABLE,
***************
*** 347,396 ****
       "The prefix for import libraries that you link to.",
       "The prefix to use for the name of an import library if used "
!      "on this platform.",
!      false,
!      "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_IMPORT_LIBRARY_SUFFIX", cmProperty::VARIABLE,
       "The suffix for import  libraries that you link to.",
       "The suffix to use for the end of an import library if used "
!      "on this platform.",
!      false,
!      "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_SHARED_LIBRARY_PREFIX", cmProperty::VARIABLE,
       "The prefix for shared libraries that you link to.",
!      "The prefix to use for the name of a shared library, lib on UNIX.",
!      false,
!      "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_SHARED_LIBRARY_SUFFIX", cmProperty::VARIABLE,
       "The suffix for shared libraries that you link to.",
!      "The suffix to use for the end of a shared library, .dll on Windows.",
!      false,
!      "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_SHARED_MODULE_PREFIX", cmProperty::VARIABLE,
       "The prefix for loadable modules that you link to.",
!      "The prefix to use for the name of a loadable module on this platform.",
!      false,
!      "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_SHARED_MODULE_SUFFIX", cmProperty::VARIABLE,
       "The suffix for shared libraries that you link to.",
!      "The suffix to use for the end of a loadable module on this platform",
!      false,
!      "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_STATIC_LIBRARY_PREFIX", cmProperty::VARIABLE,
       "The prefix for static libraries that you link to.",
!      "The prefix to use for the name of a static library, lib on UNIX.",
!      false,
!      "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_STATIC_LIBRARY_SUFFIX", cmProperty::VARIABLE,
       "The suffix for static libraries that you link to.",
!      "The suffix to use for the end of a static library, .lib on Windows.",
!      false,
!      "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES", cmProperty::VARIABLE,
--- 349,406 ----
       "The prefix for import libraries that you link to.",
       "The prefix to use for the name of an import library if used "
!      "on this platform."
!      "\n"
!      "CMAKE_IMPORT_LIBRARY_PREFIX_<LANG> overrides this for language <LANG>."
!      ,false, "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_IMPORT_LIBRARY_SUFFIX", cmProperty::VARIABLE,
       "The suffix for import  libraries that you link to.",
       "The suffix to use for the end of an import library if used "
!      "on this platform."
!      "\n"
!      "CMAKE_IMPORT_LIBRARY_SUFFIX_<LANG> overrides this for language <LANG>."
!      ,false, "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_SHARED_LIBRARY_PREFIX", cmProperty::VARIABLE,
       "The prefix for shared libraries that you link to.",
!      "The prefix to use for the name of a shared library, lib on UNIX."
!      "\n"
!      "CMAKE_SHARED_LIBRARY_PREFIX_<LANG> overrides this for language <LANG>."
!      ,false, "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_SHARED_LIBRARY_SUFFIX", cmProperty::VARIABLE,
       "The suffix for shared libraries that you link to.",
!      "The suffix to use for the end of a shared library, .dll on Windows."
!      "\n"
!      "CMAKE_SHARED_LIBRARY_SUFFIX_<LANG> overrides this for language <LANG>."
!      ,false, "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_SHARED_MODULE_PREFIX", cmProperty::VARIABLE,
       "The prefix for loadable modules that you link to.",
!      "The prefix to use for the name of a loadable module on this platform."
!      "\n"
!      "CMAKE_SHARED_MODULE_PREFIX_<LANG> overrides this for language <LANG>."
!      ,false, "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_SHARED_MODULE_SUFFIX", cmProperty::VARIABLE,
       "The suffix for shared libraries that you link to.",
!      "The suffix to use for the end of a loadable module on this platform"
!      "\n"
!      "CMAKE_SHARED_MODULE_SUFFIX_<LANG> overrides this for language <LANG>."
!      ,false, "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_STATIC_LIBRARY_PREFIX", cmProperty::VARIABLE,
       "The prefix for static libraries that you link to.",
!      "The prefix to use for the name of a static library, lib on UNIX."
!      "\n"
!      "CMAKE_STATIC_LIBRARY_PREFIX_<LANG> overrides this for language <LANG>."
!      ,false, "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_STATIC_LIBRARY_SUFFIX", cmProperty::VARIABLE,
       "The suffix for static libraries that you link to.",
!      "The suffix to use for the end of a static library, .lib on Windows."
!      "\n"
!      "CMAKE_STATIC_LIBRARY_SUFFIX_<LANG> overrides this for language <LANG>."
!      ,false, "Variables that Provide Information");
    cm->DefineProperty
      ("CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES", cmProperty::VARIABLE,
***************
*** 1246,1249 ****
--- 1256,1261 ----
    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);
***************
*** 1252,1255 ****
--- 1264,1271 ----
    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);
***************
*** 1270,1273 ****
--- 1286,1293 ----
    cm->DefineProperty("CMAKE_SHARED_LIBRARY_LINK_STATIC_<LANG>_FLAGS",
                       cmProperty::VARIABLE,0,0);
+   cm->DefineProperty("CMAKE_SHARED_LIBRARY_PREFIX_<LANG>",
+                      cmProperty::VARIABLE,0,0);
+   cm->DefineProperty("CMAKE_SHARED_LIBRARY_SUFFIX_<LANG>",
+                      cmProperty::VARIABLE,0,0);
    cm->DefineProperty("CMAKE_SHARED_LIBRARY_RUNTIME_<LANG>_FLAG",
                       cmProperty::VARIABLE,0,0);
***************
*** 1292,1299 ****
--- 1312,1327 ----
    cm->DefineProperty("CMAKE_SHARED_MODULE_LINK_STATIC_<LANG>_FLAGS",
                       cmProperty::VARIABLE,0,0);
+   cm->DefineProperty("CMAKE_SHARED_MODULE_PREFIX_<LANG>",
+                      cmProperty::VARIABLE,0,0);
+   cm->DefineProperty("CMAKE_SHARED_MODULE_SUFFIX_<LANG>",
+                      cmProperty::VARIABLE,0,0);
    cm->DefineProperty("CMAKE_SHARED_MODULE_RUNTIME_<LANG>_FLAG",
                       cmProperty::VARIABLE,0,0);
    cm->DefineProperty("CMAKE_SHARED_MODULE_RUNTIME_<LANG>_FLAG_SEP",
                       cmProperty::VARIABLE,0,0);
+   cm->DefineProperty("CMAKE_STATIC_LIBRARY_PREFIX_<LANG>",
+                      cmProperty::VARIABLE,0,0);
+   cm->DefineProperty("CMAKE_STATIC_LIBRARY_SUFFIX_<LANG>",
+                      cmProperty::VARIABLE,0,0);
    cm->DefineProperty("CMAKE_LINK_DEPENDENT_LIBRARY_FILES",
                       cmProperty::VARIABLE,0,0);

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.259
retrieving revision 1.260
diff -C 2 -d -r1.259 -r1.260
*** cmTarget.cxx	8 Jul 2009 17:04:04 -0000	1.259
--- cmTarget.cxx	8 Jul 2009 18:33:08 -0000	1.260
***************
*** 2710,2713 ****
--- 2710,2728 ----
    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)



More information about the Cmake-commits mailing list