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

Method WriteProjectStartFortran

Source/cmLocalVisualStudio7Generator.cxx:1983–2036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1981}
1982
1983void cmLocalVisualStudio7Generator::WriteProjectStartFortran(
1984 std::ostream& fout, std::string const& libName, cmGeneratorTarget* target)
1985{
1986
1987 cmGlobalVisualStudio7Generator* gg =
1988 static_cast<cmGlobalVisualStudio7Generator*>(this->GlobalGenerator);
1989 fout << R"(<?xml version="1.0" encoding = ")" << gg->Encoding()
1990 << "\"?>\n"
1991 "<VisualStudioProject\n"
1992 "\tProjectCreator=\"Intel Fortran\"\n"
1993 "\tVersion=\""
1994 << gg->GetIntelProjectVersion() << "\"\n";
1995 cmValue p = target->GetProperty("VS_KEYWORD");
1996 char const* keyword = p ? p->c_str() : "Console Application";
1997 char const* projectType = nullptr;
1998 switch (target->GetType()) {
1999 case cmStateEnums::OBJECT_LIBRARY:
2000 case cmStateEnums::STATIC_LIBRARY:
2001 projectType = "typeStaticLibrary";
2002 if (keyword) {
2003 keyword = "Static Library";
2004 }
2005 break;
2006 case cmStateEnums::SHARED_LIBRARY:
2007 case cmStateEnums::MODULE_LIBRARY:
2008 projectType = "typeDynamicLibrary";
2009 if (!keyword) {
2010 keyword = "Dll";
2011 }
2012 break;
2013 case cmStateEnums::EXECUTABLE:
2014 if (!keyword) {
2015 keyword = "Console Application";
2016 }
2017 projectType = nullptr;
2018 break;
2019 case cmStateEnums::UTILITY:
2020 case cmStateEnums::GLOBAL_TARGET:
2021 case cmStateEnums::INTERFACE_LIBRARY:
2022 case cmStateEnums::UNKNOWN_LIBRARY:
2023 break;
2024 }
2025 if (projectType) {
2026 fout << "\tProjectType=\"" << projectType << "\"\n";
2027 }
2028 this->WriteProjectSCC(fout, target);
2029 /* clang-format off */
2030 fout<< "\tKeyword=\"" << keyword << "\"\n"
2031 "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\">\n"
2032 "\t<Platforms>\n"
2033 "\t\t<Platform\n\t\t\tName=\"" << gg->GetPlatformName() << "\"/>\n"
2034 "\t</Platforms>\n";
2035 /* clang-format on */
2036}
2037
2038void cmLocalVisualStudio7Generator::WriteProjectStart(
2039 std::ostream& fout, std::string const& libName, cmGeneratorTarget* target)

Callers 1

WriteProjectStartMethod · 0.95

Calls 6

WriteProjectSCCMethod · 0.95
c_strMethod · 0.80
EncodingMethod · 0.45
GetPropertyMethod · 0.45
GetTypeMethod · 0.45
GetGUIDMethod · 0.45

Tested by

no test coverage detected