| 1437 | } |
| 1438 | |
| 1439 | void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues(Elem& e0) |
| 1440 | { |
| 1441 | for (std::string const& c : this->Configurations) { |
| 1442 | Elem e1(e0, "PropertyGroup"); |
| 1443 | e1.Attribute("Condition", this->CalcCondition(c)); |
| 1444 | e1.Attribute("Label", "Configuration"); |
| 1445 | |
| 1446 | if (this->ProjectType != VsProjectType::csproj) { |
| 1447 | std::string configType; |
| 1448 | if (cmValue vsConfigurationType = |
| 1449 | this->GeneratorTarget->GetProperty("VS_CONFIGURATION_TYPE")) { |
| 1450 | configType = cmGeneratorExpression::Evaluate(*vsConfigurationType, |
| 1451 | this->LocalGenerator, c); |
| 1452 | } else { |
| 1453 | switch (this->GeneratorTarget->GetType()) { |
| 1454 | case cmStateEnums::SHARED_LIBRARY: |
| 1455 | case cmStateEnums::MODULE_LIBRARY: |
| 1456 | if (this->WindowsKernelMode) { |
| 1457 | configType = "Driver"; |
| 1458 | } else { |
| 1459 | configType = "DynamicLibrary"; |
| 1460 | } |
| 1461 | break; |
| 1462 | case cmStateEnums::OBJECT_LIBRARY: |
| 1463 | case cmStateEnums::STATIC_LIBRARY: |
| 1464 | configType = "StaticLibrary"; |
| 1465 | break; |
| 1466 | case cmStateEnums::EXECUTABLE: |
| 1467 | if (this->NsightTegra && |
| 1468 | !this->GeneratorTarget->Target->IsAndroidGuiExecutable()) { |
| 1469 | // Android executables are .so too. |
| 1470 | configType = "DynamicLibrary"; |
| 1471 | } else if (this->Android) { |
| 1472 | configType = "DynamicLibrary"; |
| 1473 | } else { |
| 1474 | configType = "Application"; |
| 1475 | } |
| 1476 | break; |
| 1477 | case cmStateEnums::UTILITY: |
| 1478 | case cmStateEnums::INTERFACE_LIBRARY: |
| 1479 | case cmStateEnums::GLOBAL_TARGET: |
| 1480 | if (this->NsightTegra) { |
| 1481 | // Tegra-Android platform does not understand "Utility". |
| 1482 | configType = "StaticLibrary"; |
| 1483 | } else { |
| 1484 | configType = "Utility"; |
| 1485 | } |
| 1486 | break; |
| 1487 | case cmStateEnums::UNKNOWN_LIBRARY: |
| 1488 | break; |
| 1489 | } |
| 1490 | } |
| 1491 | e1.Element("ConfigurationType", configType); |
| 1492 | } |
| 1493 | |
| 1494 | if (this->MSTools) { |
| 1495 | if (!this->Managed) { |
| 1496 | this->WriteMSToolConfigurationValues(e1, c); |
no test coverage detected