FYI: If EXEC_PROGRAM and CONFIGURE_FILE are in the same location, it works. tgl ---------------------------------- PROJECT(Config) EXEC_PROGRAM(date ARGS +%Y%m%d OUTPUT_VARIABLE BUILD_DATE ) CONFIGURE_FILE(${Config_SOURCE_DIR}/builddate.h.in ${Config_BINARY_DIR}/builddate.h )