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

Function CheckFind

Source/kwsys/testSystemTools.cxx:903–932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

901}
902
903static bool CheckFind()
904{
905 bool res = true;
906 std::string const testFindFileName("testFindFile.txt");
907 std::string const testFindFile(TEST_SYSTEMTOOLS_BINARY_DIR "/" +
908 testFindFileName);
909
910 if (!kwsys::SystemTools::Touch(testFindFile, true)) {
911 std::cerr << "Problem with Touch for: " << testFindFile << std::endl;
912 // abort here as the existence of the file only makes the test meaningful
913 return false;
914 }
915
916 std::vector<std::string> searchPaths;
917 searchPaths.emplace_back(TEST_SYSTEMTOOLS_BINARY_DIR);
918 if (kwsys::SystemTools::FindFile(testFindFileName, searchPaths, true)
919 .empty()) {
920 std::cerr << "Problem with FindFile without system paths for: "
921 << testFindFileName << std::endl;
922 res = false;
923 }
924 if (kwsys::SystemTools::FindFile(testFindFileName, searchPaths, false)
925 .empty()) {
926 std::cerr << "Problem with FindFile with system paths for: "
927 << testFindFileName << std::endl;
928 res = false;
929 }
930
931 return res;
932}
933
934static bool CheckIsSubDirectory()
935{

Callers 1

testSystemToolsFunction · 0.85

Calls 2

emplace_backMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…