I think I've settled on using configure_file to generate a cmake script that
executes the custom command for each add_custom_command that I care about.
I'll then add a dependency to this cmake script. This way I can detect the
changes in arguments for each individual command regardless of how the
You imagine correctly. :-)
We'll leave it up to the project CMakeLists authors...
File level dependencies are easy to communicate to make-based or
Visual-Studio-project-based build systems. Variable value changes, not so
easy to communicate. But you don't want *all* custom commands to rebuild
whe
I haven't tried that, and I think it could work if I could make sure I kept
track of all the possible variables that could go into making the arguments.
Is there something fundamental about CMake that would prevent it from
detecting this change? I'm guessing that CMake would have to keep a record
You should be able to configure a file into your binary directory that
references all the option variables of interest and then make a dependency
on that file for your add_custom_command.
That way, the file will change only if one of the options changes in cmake
and the dependency on it should tri
I have a project that makes use of a add_custom_command that generates some
cpp files from a given input file. The command can have different arguments
depending on some CMake OPTION variables.
If I change the option variables from the CMake GUI, configure and
regenerate the Visual Studio project