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

Function validateVersion

Source/cmInstrumentationCommand.cxx:34–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32using Version = cmInstrumentationQuery::Version;
33
34bool validateVersion(std::string const& key, std::string const& versionString,
35 int& version, cmExecutionStatus& status)
36{
37 if (!std::all_of(versionString.begin(), versionString.end(),
38 cmsysString_isdigit)) {
39 status.SetError(cmStrCat("given a non-integer ", key, '.'));
40 return false;
41 }
42 version = std::atoi(versionString.c_str());
43 if (version != 1) {
44 status.SetError(
45 cmStrCat("given an unsupported ", key, " \"", versionString,
46 "\" (the only currently supported version is 1)."));
47 return false;
48 }
49 return true;
50}
51
52bool validateDataVersion(std::string const& versionString, Version& version,
53 cmExecutionStatus& status)

Callers 1

cmInstrumentationCommandFunction · 0.85

Calls 5

c_strMethod · 0.80
cmStrCatFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
SetErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…