Is it possible to make a menu within a catkin build?
I'ld like to be able choose my build options during the catkin_make
process. I know it can be done using a bash script, but I'm wondering if it can be done within catkin?
Asked by Nap on 2015-05-22 22:05:08 UTC
Answers
You can do this by adding cmake configuration variables to your cmakelists, like this: http://stackoverflow.com/questions/7294269/how-do-i-add-a-configuration-variable-to-my-cmake-script
Note that these won't (and shouldn't) prompt you for input at build time; instead, you can set the value of these variables using the -D flag to catkin_make (or cmake):
catkin_make -DMY_VARIABLE=42
Asked by ahendrix on 2015-05-22 23:09:59 UTC
Comments
Thanks, I'm already doing that. But I wanted to make it a little easier so the users wouldn't need to remember/type the variables.
Asked by Nap on 2015-05-23 02:26:24 UTC
Making the build system interactive for every run is probably more annoying than useful. I haven't tried the -i
option to cmake, but perhaps it's appropriate in this scenario? http://www.cmake.org/runningcmake/
Asked by ahendrix on 2015-05-24 02:31:20 UTC
The -i
option has been removed from cmake as of version 3 onwards.
Asked by Nap on 2015-05-28 02:26:05 UTC
Comments