Add date of generation and generator to build_config.h
In preparation for MSVC compilation support
This commit is contained in:
parent
db11689b36
commit
38c0ee9962
@ -521,6 +521,12 @@ include(CPack)
|
|||||||
# DO this near the end - to make sure all variables have been computed
|
# DO this near the end - to make sure all variables have been computed
|
||||||
# and are final.
|
# and are final.
|
||||||
set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
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(
|
configure_file(
|
||||||
"${PROJECT_SOURCE_DIR}/build_config.h.in"
|
"${PROJECT_SOURCE_DIR}/build_config.h.in"
|
||||||
"${PROJECT_BINARY_DIR}/build_config.h"
|
"${PROJECT_BINARY_DIR}/build_config.h"
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
// will be overwritten.
|
// will be overwritten.
|
||||||
//
|
//
|
||||||
// Modify the file build_config.h.in instead.
|
// Modify the file build_config.h.in instead.
|
||||||
|
//
|
||||||
|
// This file was generated on @BUILD_CONFIG_GENDATE@ by @BUILD_CONFIG_GENTOOL@
|
||||||
|
|
||||||
#ifndef BUILD_CONFIG_H
|
#ifndef BUILD_CONFIG_H
|
||||||
#define BUILD_CONFIG_H
|
#define BUILD_CONFIG_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user