Cmakelist - Run custom command on depended file change

I'm trying to run a python script in CMakelist.txt each time a depend file changes.

This script affects the project (source files, headers...).

I've tried adding a custom command in the CMakelist.txt to execute the script with (and without) the "DEPEND" option.

It seems that CLion doesn't execute the command while reloading the CMake project.

When I used "execute_process" instead, it worked, but requires a manual project reload was requiered.

Is there a way to cause CLion to auto reload the project in case of a depend file change and execute the process?

0

请先登录再写评论。