[CMake] FIND_PROGRAM Version

Alexander Neundorf a.neundorf-work at gmx.net
Mon May 26 14:05:41 EDT 2008


On Monday 26 May 2008, hsanson wrote:
> I use FIND_PROGRAM to find a grammar parser (ragel) to generate some
> source files needed for my project. The problem is that the way ragel is
> called (arguments) is different for each mayor version. I need to get
> the program mayor version 5.x or 6.x and then set the ADD_COMMAND
> arguments accordingly but I have not found a portable way (works in
> linux and windows) way to do this.
>
> Does CMake has something like FIND_PROGRAM but that accepts or provides
> the program version information??

No. You have to find the program, run it e.g. with --version, evaluate the 
output, and proceed depending on what you get, e.g. try to find another 
version, use another set of add_custom_command() etc.

Alex


More information about the CMake mailing list