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

Function HandleTestDirectoryScopes

Source/cmSetPropertyCommand.cxx:248–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248bool HandleTestDirectoryScopes(cmExecutionStatus& status,
249 std::string& test_directory,
250 cmMakefile*& directory_makefile)
251{
252 cmMakefile* current_dir_mf = &status.GetMakefile();
253 if (!test_directory.empty()) {
254 std::string const absolute_dir_path = cmSystemTools::CollapseFullPath(
255 test_directory, current_dir_mf->GetCurrentSourceDirectory());
256 cmMakefile* dir_mf =
257 status.GetMakefile().GetGlobalGenerator()->FindMakefile(
258 absolute_dir_path);
259 if (!dir_mf) {
260 status.SetError(
261 cmStrCat("given non-existent DIRECTORY ", test_directory));
262 return false;
263 }
264 directory_makefile = dir_mf;
265 } else {
266 directory_makefile = current_dir_mf;
267 }
268 return true;
269}
270
271bool HandleTestDirectoryScopeValidation(cmExecutionStatus& status,
272 bool test_directory_option_enabled,

Callers 1

Calls 6

FindMakefileMethod · 0.80
cmStrCatFunction · 0.70
GetMakefileMethod · 0.45
emptyMethod · 0.45
GetGlobalGeneratorMethod · 0.45
SetErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…