The find_package command docs [1,2] recommend that user code
should generally look for packages using the Module mode
signature. What then about user code that ought to check
for version compatibility? Module mode only offers a check
for an EXACT version string, and does not terminate if
that condition is not met [3]. Users who need a newer-than
or same-major version check, or a strict enforcment of an
exact-version check, are advised to prefer packages that use
CMakePackageConfigHelpers to generate FooConfig[Version].cmake
files. These files, however, are ignored unless Config mode
is chosen.

Is this summary correct? Shouldn't then the general recommendation
of Module mode be qualified?

- Joachim

[1] https://cmake.org/cmake/help/v3.12/command/find_package.html
[2] https://gitlab.kitware.com/cmake/cmake/merge_requests/2446
[3] https://stackoverflow.com/questions/52633455


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-- 

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

Reply via email to