summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2015-07-28 12:02:47 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2015-07-28 12:02:47 (GMT)
commit35fb0bb8c09cfc5fd75ad87fac58799e5054b7ce (patch)
treec6280284a93c59c5404f5f354cc6e638aabf5edd /Source/cmNinjaNormalTargetGenerator.cxx
parent9e293194472134d059282f5f3155358315f3e1dc (diff)
downloadCMake-35fb0bb8c09cfc5fd75ad87fac58799e5054b7ce.zip
CMake-35fb0bb8c09cfc5fd75ad87fac58799e5054b7ce.tar.gz
CMake-35fb0bb8c09cfc5fd75ad87fac58799e5054b7ce.tar.bz2
Ninja: Make import libraries BYPRODUCTs instead of regular OUTPUTs
The MSVC linker may update a binary without touching the associated import library. Making the import library a BYPRODUCT prevents the linker from unnecessarily rerunning when the import library does not get regenerated as previously expected.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 88da09b..aabf18c 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -546,6 +546,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
}
}
+ cmNinjaDeps byproducts;
+
if (!this->TargetNameImport.empty())
{
const std::string impLibPath = localGen.ConvertToOutputFormat(
@@ -555,7 +557,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
EnsureParentDirectoryExists(impLibPath);
if(target.HasImportLibrary())
{
- outputs.push_back(targetOutputImplib);
+ byproducts.push_back(targetOutputImplib);
}
}
@@ -601,7 +603,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
&postBuildCmdLines
};
- cmNinjaDeps byproducts;
for (unsigned i = 0; i != 3; ++i)
{
for (std::vector<cmCustomCommand>::const_iterator