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

Function ParseCMakeLocalArgumentsVendor

Source/cmCxxModuleMetadata.cxx:76–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76bool ParseCMakeLocalArgumentsVendor(
77 Json::Value& cmlav, cmCxxModuleMetadata::LocalArgumentsData& out,
78 cmJSONState* state)
79{
80
81 if (!cmlav.isObject()) {
82 state->AddErrorAtValue("'vendor' must be an object", &cmlav);
83 return false;
84 }
85
86 if (cmlav.isMember("compile-options")) {
87 if (!JsonIsStringArray(cmlav["compile-options"])) {
88 state->AddErrorAtValue("'compile-options' must be an array of strings",
89 &cmlav["compile-options"]);
90 return false;
91 }
92 for (auto const& s : cmlav["compile-options"]) {
93 out.CompileOptions.push_back(s.asString());
94 }
95 }
96
97 if (cmlav.isMember("compile-features")) {
98 if (!JsonIsStringArray(cmlav["compile-features"])) {
99 state->AddErrorAtValue("'compile-features' must be an array of strings",
100 &cmlav["compile-features"]);
101 return false;
102 }
103 for (auto const& s : cmlav["compile-features"]) {
104 out.CompileFeatures.push_back(s.asString());
105 }
106 }
107
108 return true;
109}
110
111bool ParseLocalArguments(Json::Value& lav,
112 cmCxxModuleMetadata::LocalArgumentsData& out,

Callers 1

ParseLocalArgumentsFunction · 0.85

Calls 6

JsonIsStringArrayFunction · 0.85
isObjectMethod · 0.80
AddErrorAtValueMethod · 0.80
isMemberMethod · 0.80
push_backMethod · 0.80
asStringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…