[CMake] configure_file as a build step?

Jensen, Erik A Erik.Jensen at pnnl.gov
Tue May 1 19:16:37 EDT 2012


I have a JSON file that needs to have some values set based on the project's configuration. During development, this file can change rather frequently.

Currently, I am using configure_file to fill in the required values. Unfortunately, every time the file is modified, it triggers CMake to do a complete configuration and generation step. This slows down rebuilds, and is especially problematic when using Visual Studio, where the solution has to be reloaded after it is regenerated.

Is there any way to have the file generated as part of the build instead of part of the configuration/generation step?

Thanks,
-- Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120501/ad51a97c/attachment.htm>


More information about the CMake mailing list