6 ms·
Instead of creating C code inside cmake scripts it's better to use command configure_file (https://cmake.org/cmake/help/latest/command/configure_file.html https
by wmu 7y ago
Instead of creating C code inside cmake scripts it's better to use command configure_file (https://cmake.org/cmake/help/latest/command/configure_file.html https://cmake.org/cmake/help/latest/command/configure_file.h...). The command creates a source file based on a template file.
- nickez 7y agoThat doesn't run at compile time though.
- MaxBarraclough 7y agoI'm not sure what you mean here. It should use CMake's usual change-detection/dependency-tracking mechanism. [0] The generation of the .h file from the .h.in file does happen at compile-time. (Well, at build time, right before the compiler is invoked.) [0] https://stackoverflow.com/a/24246566/ https://stackoverflow.com/a/24246566/