Re: [CMake] Check if a command exists?
On 03/09/2012 21:59, Rui Maciel wrote: I have a small project which includes a couple of parsers whose lexers are generated by re2c. I intended to set cmake so that it could check if re2c is present in the system, but after browsing through the docs I've ended up empty-handed. So, is there a way to set a cmake project so that it checks if a tool/program/command is present in the build system? If there is a way to run that check, can anyone provide an example? find_program(RE2C_EXECUTABLE re2c) -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Check if a command exists?
I don't know if it's the right way, but I am looking for the executable/script with find_file and set up a custom command for it. Regards, Andreas Naumann Am 03.09.2012 21:59, schrieb Rui Maciel: I have a small project which includes a couple of parsers whose lexers are generated by re2c. I intended to set cmake so that it could check if re2c is present in the system, but after browsing through the docs I've ended up empty-handed. So, is there a way to set a cmake project so that it checks if a tool/program/command is present in the build system? If there is a way to run that check, can anyone provide an example? Thanks in advance, Rui Maciel -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Check if a command exists?
On Monday 03 September 2012, Rui Maciel wrote: I have a small project which includes a couple of parsers whose lexers are generated by re2c. I intended to set cmake so that it could check if re2c is present in the system, but after browsing through the docs I've ended up empty-handed. Use find_program() Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Check if a command exists?
On Mon, Sep 3, 2012 at 3:59 PM, Rui Maciel rui.mac...@gmail.com wrote: I have a small project which includes a couple of parsers whose lexers are generated by re2c. I intended to set cmake so that it could check if re2c is present in the system, but after browsing through the docs I've ended up empty-handed. Just an FYI - you may find the following CMake files helpful when working with re2c: http://brlcad.svn.sf.net/viewvc/brlcad/brlcad/trunk/misc/CMake/RE2C_Util.cmake http://brlcad.svn.sf.net/viewvc/brlcad/brlcad/trunk/misc/CMake/FindRE2C.cmake They could use some cleanup, but they may be a helpful starting point. Cheers, CY -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake