The current (3.12.2) "if" documentation says, e.g.,
if(<variable|string> VERSION_LESS_EQUAL <variable|string>) Component-wise integer version number comparison (version format is major[.minor[.patch[.tweak]]]). But what happens if any component of the version string is not an integer, e.g., cmake version 3.12.20180915-g6f04e for the latest git version used for the cmake dashboard. It appears from the CMAKE_CACHE_PATCH_VERSION:INTERNAL=20180915 CMakeCache.txt entry that the string "20180915-g6f04e" is reliably converted in that case to the integer 20180915, but does that reliable conversion also occur for the "if" VERSION comparisons? And if so, shouldn't the "if" documentation say something about truncation of trailing non-integer parts of the version components? What has lead me to these two questions is I am trying to distinguish between the above version and 3.12.2, and since the documentation did not acknowledge what would be done when non-integer strings were appended to any of the integer components of the version string, I am concerned the component integers might be determined in an unreliable way for trailing non-integer string cases. Alan __________________________ Alan W. Irwin Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers