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

Method WriteManifestOptions

Source/cmVisualStudio10TargetGenerator.cxx:4381–4419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4379}
4380
4381void cmVisualStudio10TargetGenerator::WriteManifestOptions(
4382 Elem& e1, std::string const& config)
4383{
4384 if (this->GeneratorTarget->GetType() != cmStateEnums::EXECUTABLE &&
4385 this->GeneratorTarget->GetType() != cmStateEnums::SHARED_LIBRARY &&
4386 this->GeneratorTarget->GetType() != cmStateEnums::MODULE_LIBRARY) {
4387 return;
4388 }
4389
4390 std::vector<cmSourceFile const*> manifest_srcs;
4391 this->GeneratorTarget->GetManifests(manifest_srcs, config);
4392
4393 cmValue dpiAware = this->GeneratorTarget->GetProperty("VS_DPI_AWARE");
4394
4395 if (!manifest_srcs.empty() || dpiAware) {
4396 Elem e2(e1, "Manifest");
4397 if (!manifest_srcs.empty()) {
4398 std::ostringstream oss;
4399 for (cmSourceFile const* mi : manifest_srcs) {
4400 std::string m = this->ConvertPath(mi->GetFullPath(), false);
4401 ConvertToWindowsSlash(m);
4402 oss << m << ";";
4403 }
4404 e2.Element("AdditionalManifestFiles", oss.str());
4405 }
4406 if (dpiAware) {
4407 if (*dpiAware == "PerMonitor"_s) {
4408 e2.Element("EnableDpiAwareness", "PerMonitorHighDPIAware");
4409 } else if (dpiAware.IsOn()) {
4410 e2.Element("EnableDpiAwareness", "true");
4411 } else if (dpiAware.IsOff()) {
4412 e2.Element("EnableDpiAwareness", "false");
4413 } else {
4414 cmSystemTools::Error(
4415 cmStrCat("Bad parameter for VS_DPI_AWARE: ", *dpiAware));
4416 }
4417 }
4418 }
4419}
4420
4421void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
4422 Elem& e1, std::string const& configName)

Callers 1

Calls 13

ConvertPathMethod · 0.95
ConvertToWindowsSlashFunction · 0.85
strMethod · 0.80
ErrorClass · 0.70
cmStrCatFunction · 0.70
GetTypeMethod · 0.45
GetManifestsMethod · 0.45
GetPropertyMethod · 0.45
emptyMethod · 0.45
GetFullPathMethod · 0.45
ElementMethod · 0.45
IsOnMethod · 0.45

Tested by

no test coverage detected