

#Cmake versions code#
Code source is available on GitHub under license MIT/X11. If CMake version is less than 3.12, the if block will be true, and the policy will be set to the current CMake version. This two-passes system allows for example to find the right version for the property BINARY_DIR: the string BINARY_DIR obviously exists in CMake documentation v2.6, while it exists as a property only since CMake v3.7.Īny bug report or improvement request are welcome. If the first checking process returns v3.0, a second pass is performed for older versions using a less reliable test: the single-page documentation is requested, and the feature string is searched in the text. Versions are tested using a dichotomic approach, to limit requests. Here urls are tested replacing latest with a version string: For example, considering url for property BINARY_DIR:

When viewing a page of CMake documentation, it checks since which version the corresponding feature exists, and adds the information to the html contents.Ī first checking is performed for versions starting with v3.0: the url pattern is checked for prior versions until a 404 error is returned by the server. In the CMakeLists.txt line 216 and 218 make a findpackage call with HarfBuzz.

I made a firefox plugin, named CSince, available in. Freetype with CMake 3.17 and higher versions generating warning.
