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

Method WriteConfiguration

Source/cmLocalVisualStudio7Generator.cxx:618–958  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

616};
617
618void cmLocalVisualStudio7Generator::WriteConfiguration(
619 std::ostream& fout, std::string const& configName,
620 std::string const& libName, cmGeneratorTarget* target)
621{
622 std::string mfcFlag;
623 if (cmValue p = this->Makefile->GetDefinition("CMAKE_MFC_FLAG")) {
624 mfcFlag = cmGeneratorExpression::Evaluate(*p, this, configName);
625 } else {
626 mfcFlag = "0";
627 }
628 cmGlobalVisualStudio7Generator* gg =
629 static_cast<cmGlobalVisualStudio7Generator*>(this->GlobalGenerator);
630 fout << "\t\t<Configuration\n"
631 "\t\t\tName=\""
632 << configName << '|' << gg->GetPlatformName() << "\"\n";
633 // This is an internal type to Visual Studio, it seems that:
634 // 4 == static library
635 // 2 == dll
636 // 1 == executable
637 // 10 == utility
638 char const* configType = "10";
639 char const* projectType = nullptr;
640 bool targetBuilds = true;
641
642 switch (target->GetType()) {
643 case cmStateEnums::OBJECT_LIBRARY:
644 targetBuilds = false; // no manifest tool for object library
645 CM_FALLTHROUGH;
646 case cmStateEnums::STATIC_LIBRARY:
647 projectType = "typeStaticLibrary";
648 configType = "4";
649 break;
650 case cmStateEnums::SHARED_LIBRARY:
651 case cmStateEnums::MODULE_LIBRARY:
652 projectType = "typeDynamicLibrary";
653 configType = "2";
654 break;
655 case cmStateEnums::EXECUTABLE:
656 configType = "1";
657 break;
658 case cmStateEnums::UTILITY:
659 case cmStateEnums::GLOBAL_TARGET:
660 case cmStateEnums::INTERFACE_LIBRARY:
661 configType = "10";
662 CM_FALLTHROUGH;
663 case cmStateEnums::UNKNOWN_LIBRARY:
664 targetBuilds = false;
665 break;
666 }
667 if (this->FortranProject && projectType) {
668 configType = projectType;
669 }
670 std::string flags;
671 std::string langForClCompile;
672 std::string const& linkLanguage =
673 (this->FortranProject ? std::string("Fortran")
674 : target->GetLinkerLanguage(configName));
675 if (linkLanguage.empty()) {

Callers 1

WriteConfigurationsMethod · 0.95

Calls 15

EscapeForXMLMethod · 0.95
OutputTargetRulesMethod · 0.95
OutputBuildToolMethod · 0.95
cmLVS7G_IsFATFunction · 0.85
AddLanguageFlagsMethod · 0.80
AddCompileOptionsMethod · 0.80
IsIPOEnabledMethod · 0.80
AppendCompileOptionsMethod · 0.80
GetDefineFlagsMethod · 0.80

Tested by

no test coverage detected