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

Function MakeSourceFilePathsAbsoluteIfNeeded

Source/cmSetPropertyCommand.cxx:314–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314void MakeSourceFilePathsAbsoluteIfNeeded(
315 cmExecutionStatus& status,
316 std::vector<std::string>& source_files_absolute_paths,
317 std::vector<std::string>::const_iterator files_it_begin,
318 std::vector<std::string>::const_iterator files_it_end, bool const needed)
319{
320
321 // Make the file paths absolute, so that relative source file paths are
322 // picked up relative to the command calling site, regardless of the
323 // directory scope.
324 std::vector<std::string>::difference_type num_files =
325 files_it_end - files_it_begin;
326 source_files_absolute_paths.reserve(num_files);
327
328 if (!needed) {
329 source_files_absolute_paths.assign(files_it_begin, files_it_end);
330 return;
331 }
332
333 for (; files_it_begin != files_it_end; ++files_it_begin) {
334 std::string const absolute_file_path =
335 MakeSourceFilePathAbsoluteIfNeeded(status, *files_it_begin, true);
336 source_files_absolute_paths.push_back(absolute_file_path);
337 }
338}
339
340bool HandleAndValidateSourceFilePropertyGENERATED(
341 cmSourceFile* sf, std::string const& propertyValue, PropertyOp op)

Callers 2

HandleSourceModeFunction · 0.85

Calls 4

reserveMethod · 0.80
assignMethod · 0.80
push_backMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…