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

Function parseVersion

Source/cmFindPackageCommand.cxx:442–448  ·  view source on GitHub ↗

Parse the version number and store the results that were successfully parsed.

Source from the content-addressed store, hash-verified

440// Parse the version number and store the results that were
441// successfully parsed.
442unsigned int parseVersion(std::string const& version, unsigned int& major,
443 unsigned int& minor, unsigned int& patch,
444 unsigned int& tweak)
445{
446 return static_cast<unsigned int>(std::sscanf(
447 version.c_str(), "%u.%u.%u.%u", &major, &minor, &patch, &tweak));
448}
449
450} // anonymous namespace
451

Callers 3

InitialPassMethod · 0.85
CheckVersionFileMethod · 0.85

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…