| 3220 | } |
| 3221 | |
| 3222 | bool cmTargetInternals::CheckImportedLibName(std::string const& prop, |
| 3223 | std::string const& value) const |
| 3224 | { |
| 3225 | if (this->TargetType != cmStateEnums::INTERFACE_LIBRARY || |
| 3226 | !this->IsImported()) { |
| 3227 | this->Makefile->IssueMessage( |
| 3228 | MessageType::FATAL_ERROR, |
| 3229 | prop + |
| 3230 | " property may be set only on imported INTERFACE library targets."); |
| 3231 | return false; |
| 3232 | } |
| 3233 | if (!value.empty()) { |
| 3234 | if (value[0] == '-') { |
| 3235 | this->Makefile->IssueMessage(MessageType::FATAL_ERROR, |
| 3236 | prop + " property value\n " + value + |
| 3237 | "\nmay not start with '-'."); |
| 3238 | return false; |
| 3239 | } |
| 3240 | std::string::size_type bad = value.find_first_of(":/\\;"); |
| 3241 | if (bad != std::string::npos) { |
| 3242 | this->Makefile->IssueMessage(MessageType::FATAL_ERROR, |
| 3243 | prop + " property value\n " + value + |
| 3244 | "\nmay not contain '" + |
| 3245 | value.substr(bad, 1) + "'."); |
| 3246 | return false; |
| 3247 | } |
| 3248 | } |
| 3249 | return true; |
| 3250 | } |
| 3251 | |
| 3252 | bool cmTarget::GetMappedConfig(std::string const& desiredConfig, cmValue& loc, |
| 3253 | cmValue& imp, std::string& suffix) const |
no test coverage detected