I would like to add a target to format my code with clang-format. However, 
clang-format isn't installed as "clang-format" (at least not on Ubuntu). 
Instead, it installs itself as "clang-format-3.4", "clang-format-3.5", etc.

Is there a reasonable way to locate the binary with the largest version number 
>= than some minimum version? For example, I'd like to find clang-format-3.5 or 
later (even if the next version happens to be "clang-format-4.0"), and then 
create a symlink in the build tree for other scripts to use.

I looked at find_program, but it doesn't appear to deal with this.

I'd appreciate any suggestions.

Thanks,

Michi. 
--

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:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to