mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 21:00:17 -06:00
VS: Do not specify incremental linking if LTCG is enabled
Otherwise the linker may warn:
LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user