File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 4040#define CERES_TO_STRING_HELPER (x ) #x
4141#define CERES_TO_STRING (x ) CERES_TO_STRING_HELPER(x)
4242
43+ // clang-format off
44+ #define CERES_SEMVER_VERSION (MAJOR , MINOR , PATCH ) \
45+ CERES_TO_STRING(MAJOR) "." \
46+ CERES_TO_STRING(MINOR) "." \
47+ CERES_TO_STRING(PATCH)
48+ // clang-format on
49+
4350// The Ceres version as a string; for example "1.9.0".
44- #define CERES_VERSION_STRING \
45- CERES_TO_STRING(CERES_VERSION_MAJOR) \
46- "." CERES_TO_STRING(CERES_VERSION_MINOR) "." CERES_TO_STRING( \
47- CERES_VERSION_REVISION)
51+ #define CERES_VERSION_STRING \
52+ CERES_SEMVER_VERSION( \
53+ CERES_VERSION_MAJOR, CERES_VERSION_MINOR, CERES_VERSION_REVISION)
4854
4955#endif // CERES_PUBLIC_VERSION_H_
Original file line number Diff line number Diff line change 4040
4141namespace ceres ::internal {
4242
43- // clang-format off
44- #define CERES_EIGEN_VERSION \
45- CERES_TO_STRING (EIGEN_WORLD_VERSION) " ." \
46- CERES_TO_STRING (EIGEN_MAJOR_VERSION) " ." \
47- CERES_TO_STRING (EIGEN_MINOR_VERSION)
48- // clang-format on
49-
5043constexpr char kVersion [] =
5144 // clang-format off
52- CERES_VERSION_STRING
53- " -eigen-(" CERES_EIGEN_VERSION " )"
45+ CERES_VERSION_STRING " -eigen-("
46+ CERES_SEMVER_VERSION (EIGEN_WORLD_VERSION,
47+ EIGEN_MAJOR_VERSION,
48+ EIGEN_MINOR_VERSION) " )"
5449
5550#ifdef CERES_NO_LAPACK
5651 " -no_lapack"
You can’t perform that action at this time.
0 commit comments