diff --git a/CMakeLists.txt b/CMakeLists.txt index 206c974..1719f1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -521,6 +521,12 @@ include(CPack) # DO this near the end - to make sure all variables have been computed # and are final. set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) +set(BUILD_CONFIG_GENTOOL CMake) +# CMake does not have a date format specifier for timezone... +execute_process(COMMAND date -R RESULT_VARIABLE DATE_EXITVAL OUTPUT_VARIABLE BUILD_CONFIG_GENDATE ERROR_FILE /dev/null OUTPUT_STRIP_TRAILING_WHITESPACE) +if(DATE_EXITVAL) + message(FATAL_ERROR "Failed to run command 'date -R'") +endif(DATE_EXITVAL) configure_file( "${PROJECT_SOURCE_DIR}/build_config.h.in" "${PROJECT_BINARY_DIR}/build_config.h" diff --git a/build_config.h.in b/build_config.h.in index 2809661..8549154 100644 --- a/build_config.h.in +++ b/build_config.h.in @@ -2,6 +2,8 @@ // will be overwritten. // // Modify the file build_config.h.in instead. +// +// This file was generated on @BUILD_CONFIG_GENDATE@ by @BUILD_CONFIG_GENTOOL@ #ifndef BUILD_CONFIG_H #define BUILD_CONFIG_H