From 872e5dd859074567c3befbda9225e08710d13669 Mon Sep 17 00:00:00 2001 From: DRC Date: Sat, 17 Oct 2015 18:55:08 -0500 Subject: Allow BUILD_TIMESTAMP to be set statically --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 904809c2..d788b602 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,12 +39,9 @@ if(MSVC) message(FATAL_ERROR "TigerVNC cannot be built with Visual Studio. Please use MinGW") endif() -set(BUILD_TIMESTAMP "") -execute_process(COMMAND "date" "+%Y-%m-%d %H:%M" OUTPUT_VARIABLE BUILD_TIMESTAMP) - if(NOT BUILD_TIMESTAMP) set(BUILD_TIMESTAMP "") -else() + execute_process(COMMAND "date" "+%Y-%m-%d %H:%M" OUTPUT_VARIABLE BUILD_TIMESTAMP) string(REGEX REPLACE "\n" "" BUILD_TIMESTAMP ${BUILD_TIMESTAMP}) endif() @@ -57,6 +54,7 @@ endif() message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") message(STATUS "VERSION = ${VERSION}") +message(STATUS "BUILD_TIMESTAMP = ${BUILD_TIMESTAMP}") add_definitions(-DBUILD_TIMESTAMP="${BUILD_TIMESTAMP}") # We want to keep our asserts even in release builds so remove NDEBUG -- cgit v1.2.3