| 1412 | } |
| 1413 | |
| 1414 | void cmFindPackageCommand::SetVersionVariables( |
| 1415 | std::function<void(std::string const&, cm::string_view)> const& |
| 1416 | addDefinition, |
| 1417 | std::string const& prefix, std::string const& version, |
| 1418 | unsigned int const count, unsigned int const major, unsigned int const minor, |
| 1419 | unsigned int const patch, unsigned int const tweak) |
| 1420 | { |
| 1421 | addDefinition(prefix, version); |
| 1422 | |
| 1423 | char buf[64]; |
| 1424 | snprintf(buf, sizeof(buf), "%u", major); |
| 1425 | addDefinition(prefix + "_MAJOR", buf); |
| 1426 | snprintf(buf, sizeof(buf), "%u", minor); |
| 1427 | addDefinition(prefix + "_MINOR", buf); |
| 1428 | snprintf(buf, sizeof(buf), "%u", patch); |
| 1429 | addDefinition(prefix + "_PATCH", buf); |
| 1430 | snprintf(buf, sizeof(buf), "%u", tweak); |
| 1431 | addDefinition(prefix + "_TWEAK", buf); |
| 1432 | snprintf(buf, sizeof(buf), "%u", count); |
| 1433 | addDefinition(prefix + "_COUNT", buf); |
| 1434 | } |
| 1435 | |
| 1436 | void cmFindPackageCommand::SetModuleVariables() |
| 1437 | { |
no test coverage detected