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

Function DetectVCS

Source/CTest/cmCTestUpdateCommand.cxx:98–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98int DetectVCS(std::string const& dir)
99{
100 if (cmSystemTools::FileExists(cmStrCat(dir, "/CVS"))) {
101 return e_CVS;
102 }
103 if (cmSystemTools::FileExists(cmStrCat(dir, "/.svn"))) {
104 return e_SVN;
105 }
106 if (cmSystemTools::FileExists(cmStrCat(dir, "/.bzr"))) {
107 return e_BZR;
108 }
109 if (cmSystemTools::FileExists(cmStrCat(dir, "/.git"))) {
110 return e_GIT;
111 }
112 if (cmSystemTools::FileExists(cmStrCat(dir, "/.hg"))) {
113 return e_HG;
114 }
115 if (cmSystemTools::FileExists(cmStrCat(dir, "/.p4"))) {
116 return e_P4;
117 }
118 if (cmSystemTools::FileExists(cmStrCat(dir, "/.p4config"))) {
119 return e_P4;
120 }
121 return e_UNKNOWN;
122}
123
124std::unique_ptr<cmCTestVC> MakeVC(int type, cmCTest* ctest, cmMakefile* mf,
125 std::ostream& os)

Callers 1

ExecuteUpdateMethod · 0.85

Calls 2

FileExistsFunction · 0.50
cmStrCatFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…