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

Method WriteMSToolConfigurationValues

Source/cmVisualStudio10TargetGenerator.cxx:1538–1588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1536}
1537
1538void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues(
1539 Elem& e1, std::string const& config)
1540{
1541 cmValue mfcFlag = this->Makefile->GetDefinition("CMAKE_MFC_FLAG");
1542 if (mfcFlag) {
1543 std::string const mfcFlagValue =
1544 cmGeneratorExpression::Evaluate(*mfcFlag, this->LocalGenerator, config);
1545
1546 std::string useOfMfcValue = "false";
1547 if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) {
1548 if (mfcFlagValue == "1"_s) {
1549 useOfMfcValue = "Static";
1550 } else if (mfcFlagValue == "2"_s) {
1551 useOfMfcValue = "Dynamic";
1552 }
1553 }
1554 e1.Element("UseOfMfc", useOfMfcValue);
1555 }
1556
1557 if (this->CharSet[config] == MsvcCharSet::Unicode) {
1558 e1.Element("CharacterSet", "Unicode");
1559 } else if (this->CharSet[config] == MsvcCharSet::SingleByte) {
1560 e1.Element("CharacterSet", "NotSet");
1561 } else {
1562 e1.Element("CharacterSet", "MultiByte");
1563 }
1564
1565 this->WriteMSToolConfigurationValuesCommon(e1, config);
1566
1567 if (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT") ||
1568 this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_EXTENSIONS")) {
1569 e1.Element("WindowsAppContainer", "true");
1570 }
1571 if (this->IPOEnabledConfigurations.count(config) > 0) {
1572 e1.Element("WholeProgramOptimization", "true");
1573 }
1574 if (this->ASanEnabledConfigurations.find(config) !=
1575 this->ASanEnabledConfigurations.end()) {
1576 e1.Element("EnableAsan", "true");
1577 }
1578 if (this->FuzzerEnabledConfigurations.find(config) !=
1579 this->FuzzerEnabledConfigurations.end()) {
1580 e1.Element("EnableFuzzer", "true");
1581 }
1582 {
1583 auto s = this->SpectreMitigation.find(config);
1584 if (s != this->SpectreMitigation.end()) {
1585 e1.Element("SpectreMitigation", s->second);
1586 }
1587 }
1588}
1589
1590void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValuesManaged(
1591 Elem& e1, std::string const& config)

Callers 1

Calls 8

GetDefinitionMethod · 0.45
GetTypeMethod · 0.45
ElementMethod · 0.45
GetPropertyAsBoolMethod · 0.45
countMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected