MCPcopy Create free account
hub / github.com/Kitware/CMake / OutputLinkIncremental

Method OutputLinkIncremental

Source/cmVisualStudio10TargetGenerator.cxx:3260–3307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3258}
3259
3260void cmVisualStudio10TargetGenerator::OutputLinkIncremental(
3261 Elem& e1, std::string const& configName)
3262{
3263 if (!this->MSTools) {
3264 return;
3265 }
3266 if (this->WindowsKernelMode) {
3267 return;
3268 }
3269 if (this->ProjectType == VsProjectType::csproj) {
3270 return;
3271 }
3272
3273 // static libraries and things greater than modules do not need
3274 // to set this option
3275 if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY ||
3276 this->GeneratorTarget->GetType() > cmStateEnums::MODULE_LIBRARY) {
3277 return;
3278 }
3279 Options& linkOptions = *(this->LinkOptions[configName]);
3280 std::string const cond = this->CalcCondition(configName);
3281
3282 if (this->IPOEnabledConfigurations.count(configName) > 0) {
3283 // Suppress LinkIncremental in favor of WholeProgramOptimization.
3284 e1.WritePlatformConfigTag("LinkIncremental", cond, "");
3285 } else {
3286 char const* incremental = linkOptions.GetFlag("LinkIncremental");
3287 e1.WritePlatformConfigTag("LinkIncremental", cond,
3288 (incremental ? incremental : "true"));
3289 }
3290 linkOptions.RemoveFlag("LinkIncremental");
3291
3292 char const* manifest = linkOptions.GetFlag("GenerateManifest");
3293 e1.WritePlatformConfigTag("GenerateManifest", cond,
3294 (manifest ? manifest : "true"));
3295 linkOptions.RemoveFlag("GenerateManifest");
3296
3297 // Some link options belong here. Use them now and remove them so that
3298 // WriteLinkOptions does not use them.
3299 static std::vector<std::string> const flags{ "LinkDelaySign",
3300 "LinkKeyFile" };
3301 for (std::string const& flag : flags) {
3302 if (char const* value = linkOptions.GetFlag(flag)) {
3303 e1.WritePlatformConfigTag(flag, cond, value);
3304 linkOptions.RemoveFlag(flag);
3305 }
3306 }
3307}
3308
3309std::vector<std::string> cmVisualStudio10TargetGenerator::GetIncludes(
3310 std::string const& config, std::string const& lang) const

Callers 1

Calls 6

CalcConditionMethod · 0.95
GetFlagMethod · 0.80
RemoveFlagMethod · 0.80
GetTypeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected