diff options
author | Brad King <brad.king@kitware.com> | 2018-09-12 17:45:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-09-17 14:53:27 (GMT) |
commit | bef80e66231a0bd2feffab02fe8d1d8f55eb793c (patch) | |
tree | 27706e8f79e3d7e1f7d9e995ddb0a7669b6c3907 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 567fabe88e97c3e39503fd353b484648bcf1cbb2 (diff) | |
download | CMake-bef80e66231a0bd2feffab02fe8d1d8f55eb793c.zip CMake-bef80e66231a0bd2feffab02fe8d1d8f55eb793c.tar.gz CMake-bef80e66231a0bd2feffab02fe8d1d8f55eb793c.tar.bz2 |
VS: Do not specify incremental linking if LTCG is enabled
Otherwise the linker may warn:
LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index c0b0435..2a54cfc 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2374,9 +2374,11 @@ void cmVisualStudio10TargetGenerator::OutputLinkIncremental( Options& linkOptions = *(this->LinkOptions[configName]); const std::string cond = this->CalcCondition(configName); - const char* incremental = linkOptions.GetFlag("LinkIncremental"); - e1.WritePlatformConfigTag("LinkIncremental", cond, - (incremental ? incremental : "true")); + if (this->IPOEnabledConfigurations.count(configName) == 0) { + const char* incremental = linkOptions.GetFlag("LinkIncremental"); + e1.WritePlatformConfigTag("LinkIncremental", cond, + (incremental ? incremental : "true")); + } linkOptions.RemoveFlag("LinkIncremental"); const char* manifest = linkOptions.GetFlag("GenerateManifest"); |