| 74 | } |
| 75 | |
| 76 | bool 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 | |
| 111 | bool ParseLocalArguments(Json::Value& lav, |
| 112 | cmCxxModuleMetadata::LocalArgumentsData& out, |
no test coverage detected
searching dependent graphs…