summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorChristian Pfeiffer <cpfeiffer@live.de>2017-03-28 09:51:35 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-28 14:34:26 (GMT)
commit7a411dfbf6d9987869fd39e57f38f6a9c3d548aa (patch)
tree77e9ba2be1be344f039a5c1785d34363fbb964c2 /Source
parent21499431e05b0defb134b10b1753488c0516bafd (diff)
downloadCMake-7a411dfbf6d9987869fd39e57f38f6a9c3d548aa.zip
CMake-7a411dfbf6d9987869fd39e57f38f6a9c3d548aa.tar.gz
CMake-7a411dfbf6d9987869fd39e57f38f6a9c3d548aa.tar.bz2
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 (...)
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 7c33821..3117ef3 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -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"