[Cmake-commits] [cmake-commits] king committed cmExportFileGenerator.cxx 1.17 1.18 cmTarget.cxx 1.263 1.264
cmake-commits at cmake.org
cmake-commits at cmake.org
Sat Jul 11 10:12:07 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv27347/Source
Modified Files:
cmExportFileGenerator.cxx cmTarget.cxx
Log Message:
ENH: Export and import link interface languages
Now that languages are part of the link interface of a target we need to
export/import the information. A new IMPORTED_LINK_INTERFACE_LANGUAGES
property and per-config IMPORTED_LINK_INTERFACE_LANGUAGES_<CONFIG>
property specify the information for imported targets. The export() and
install(EXPORT) commands automatically set the properties.
Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.263
retrieving revision 1.264
diff -C 2 -d -r1.263 -r1.264
*** cmTarget.cxx 10 Jul 2009 17:53:48 -0000 1.263
--- cmTarget.cxx 11 Jul 2009 14:12:05 -0000 1.264
***************
*** 312,315 ****
--- 312,339 ----
cm->DefineProperty
+ ("IMPORTED_LINK_INTERFACE_LANGUAGES", cmProperty::TARGET,
+ "Languages compiled into an IMPORTED static library.",
+ "Lists languages of soure files compiled to produce a STATIC IMPORTED "
+ "library (such as \"C\" or \"CXX\"). "
+ "CMake accounts for these languages when computing how to link a "
+ "target to the imported library. "
+ "For example, when a C executable links to an imported C++ static "
+ "library CMake chooses the C++ linker to satisfy language runtime "
+ "dependencies of the static library. "
+ "\n"
+ "This property is ignored for targets that are not STATIC libraries. "
+ "This property is ignored for non-imported targets.");
+
+ cm->DefineProperty
+ ("IMPORTED_LINK_INTERFACE_LANGUAGES_<CONFIG>", cmProperty::TARGET,
+ "Per-configuration version of IMPORTED_LINK_INTERFACE_LANGUAGES.",
+ "This property is used when loading settings for the <CONFIG> "
+ "configuration of an imported target. "
+ "Configuration names correspond to those provided by the project "
+ "from which the target is imported. "
+ "If set, this property completely overrides the generic property "
+ "for the named configuration.");
+
+ cm->DefineProperty
("IMPORTED_LOCATION", cmProperty::TARGET,
"Full path to the main file on disk for an IMPORTED target.",
***************
*** 3792,3795 ****
--- 3816,3837 ----
}
}
+
+ // Get the link languages.
+ if(this->GetType() == cmTarget::STATIC_LIBRARY)
+ {
+ std::string linkProp = "IMPORTED_LINK_INTERFACE_LANGUAGES";
+ linkProp += suffix;
+ if(const char* config_libs = this->GetProperty(linkProp.c_str()))
+ {
+ cmSystemTools::ExpandListArgument(config_libs,
+ info.LinkInterface.Languages);
+ }
+ else if(const char* libs =
+ this->GetProperty("IMPORTED_LINK_INTERFACE_LANGUAGES"))
+ {
+ cmSystemTools::ExpandListArgument(libs,
+ info.LinkInterface.Languages);
+ }
+ }
}
Index: cmExportFileGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExportFileGenerator.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -C 2 -d -r1.17 -r1.18
*** cmExportFileGenerator.cxx 7 Jul 2009 13:45:23 -0000 1.17
--- cmExportFileGenerator.cxx 11 Jul 2009 14:12:03 -0000 1.18
***************
*** 154,157 ****
--- 154,160 ----
{
this->SetImportLinkProperty(suffix, target,
+ "IMPORTED_LINK_INTERFACE_LANGUAGES",
+ iface->Languages, properties);
+ this->SetImportLinkProperty(suffix, target,
"IMPORTED_LINK_INTERFACE_LIBRARIES",
iface->Libraries, properties);
More information about the Cmake-commits
mailing list