[CMake] CMP0058 warning on configure-time generated source files

Sylvain Joubert joubert.sy at gmail.com
Thu Oct 29 10:33:42 EDT 2015


Hi,

In my project I have some source files that are generated at configure time.
Much like configure_file but using one execute_process call with an
external executable,
then a second execute_process with cmake -E copy_if_different to avoid
unnecessary rebuild.
The generated files (from the build folder) are then used as source file
for some targets.

I recently upgraded to CMake >= 3.3 and I get a CMP0058 warning on some of
the generated files.
What I don't understand is that:
- These files are not generated at build time but at configure time, why
can't they just be seen as regular source files?
- I generate lots of these files, but only some (only a few proportionally)
are listed in the warning.
  I haven't been able to see a pattern yet and the build.ninja seems to
contain equivalent rules both for the warned and the not warned files.

What am I missing here?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151029/276e8041/attachment.html>


More information about the CMake mailing list