mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
VS: Fix OBJECT library support in Intel Fortran projects
The `TargetExt` for `.vfproj` object libraries should be `.lib`
to match the `OutputFile` value. Otherwise Visual Fortran raises
warnings:
TargetPath(...) does not match the Library's OutputFile
property value (...)
This commit is contained in:
1 parent
21499431e0
commit
7a411dfbf6
1 file changed
+6
-4
@@ -746,11 +746,13 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
|
||||
|
||||
if (this->FortranProject) {
|
||||
// Intel Fortran >= 15.0 uses TargetName property.
|
||||
std::string targetNameFull = target->GetFullName(configName);
|
||||
std::string targetName =
|
||||
std::string const targetNameFull = target->GetFullName(configName);
|
||||
std::string const targetName =
|
||||
cmSystemTools::GetFilenameWithoutLastExtension(targetNameFull);
|
||||
std::string targetExt =
|
||||
cmSystemTools::GetFilenameLastExtension(targetNameFull);
|
||||
std::string const targetExt =
|
||||
target->GetType() == cmStateEnums::OBJECT_LIBRARY
|
||||
? ".lib"
|
||||
: cmSystemTools::GetFilenameLastExtension(targetNameFull);
|
||||
/* clang-format off */
|
||||
fout <<
|
||||
"\t\t\tTargetName=\"" << this->EscapeForXML(targetName) << "\"\n"
|
||||
|
||||
Reference in new issue
Block a user