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

Function HandleSourceFileDirectoryScopeValidation

Source/cmSetPropertyCommand.cxx:202–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202bool HandleSourceFileDirectoryScopeValidation(
203 cmExecutionStatus& status, bool source_file_directory_option_enabled,
204 bool source_file_target_option_enabled,
205 std::vector<std::string>& source_file_directories,
206 std::vector<std::string>& source_file_target_directories)
207{
208 // Validate source file directory scopes.
209 if (source_file_directory_option_enabled &&
210 source_file_directories.empty()) {
211 std::string errors = "called with incorrect number of arguments "
212 "no value provided to the DIRECTORY option";
213 status.SetError(errors);
214 return false;
215 }
216 if (source_file_target_option_enabled &&
217 source_file_target_directories.empty()) {
218 std::string errors = "called with incorrect number of arguments "
219 "no value provided to the TARGET_DIRECTORY option";
220 status.SetError(errors);
221 return false;
222 }
223 return true;
224}
225
226bool HandleAndValidateSourceFileDirectoryScopes(
227 cmExecutionStatus& status, bool source_file_directory_option_enabled,

Calls 2

emptyMethod · 0.45
SetErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…