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

Method SetGeneratorPlatform

Source/cmGlobalVisualStudio8Generator.cxx:86–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86bool cmGlobalVisualStudio8Generator::SetGeneratorPlatform(std::string const& p,
87 cmMakefile* mf)
88{
89 if (!this->ParseGeneratorPlatform(p, mf)) {
90 return false;
91 }
92
93 // FIXME: Add CMAKE_GENERATOR_PLATFORM field to set the framework.
94 // For now, just report the generator's default, if any.
95 if (cm::optional<std::string> const& targetFrameworkVersion =
96 this->GetTargetFrameworkVersion()) {
97 mf->AddDefinition("CMAKE_VS_TARGET_FRAMEWORK_VERSION",
98 *targetFrameworkVersion);
99 }
100 if (cm::optional<std::string> const& targetFrameworkIdentifier =
101 this->GetTargetFrameworkIdentifier()) {
102 mf->AddDefinition("CMAKE_VS_TARGET_FRAMEWORK_IDENTIFIER",
103 *targetFrameworkIdentifier);
104 }
105 if (cm::optional<std::string> const& targetFrameworkTargetsVersion =
106 this->GetTargetFrameworkTargetsVersion()) {
107 mf->AddDefinition("CMAKE_VS_TARGET_FRAMEWORK_TARGETS_VERSION",
108 *targetFrameworkTargetsVersion);
109 }
110
111 // The generator name does not contain the platform name, and so supports
112 // explicit platform specification. We handled that above, so pass an
113 // empty platform name to our base class implementation so it does not error.
114 return this->cmGlobalVisualStudio7Generator::SetGeneratorPlatform("", mf);
115}
116
117bool cmGlobalVisualStudio8Generator::ParseGeneratorPlatform(
118 std::string const& p, cmMakefile* mf)

Callers

nothing calls this directly

Calls 2

AddDefinitionMethod · 0.45

Tested by

no test coverage detected