I am attempting to use CMake to convert a generic wrapper into a specific one, via token replacement. I hope that all the user would have to do is input a specific set of strings, have CMake do configure_file, and the wrapper would read in the values and work as intended.
I am aware of the possibility to use set to set the token that needs to be replaced:
set(FAV_FOOD "Sushi" CACHE STRING "What is your favorite food?")
As well as the option to have the user select from a set of answers like so:
set(MY_SELECTION "Option A" CACHE STRING "Help message for this variable")
set_property(
CACHE MY_SELECTION
PROPERTY STRINGS
"Option A" "Option B" "Option C"
)
The problem with this is that I can't enumerate all valid answers. Is there any way for CMake to have a GUI pop up and allow the user to answer with any string? I could just have the user fill out these values in a file before calling make, but I'd like to avoid the users doing anything by hand in the files, and I want to take advance of the CMake cache and avoid assuming that the user has already filled out the variables in a file.
Any advice would be most helpful. Thanks.