aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2016-06-14 11:01:18 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2016-06-14 11:01:18 -0700
commit4e5dacc20770d557140cf196750326934e6e6b40 (patch)
treece8999f2fe8a699c8f9b7074cbe81a79d3759cc5 /host/cmake/Modules
parent7df4134e6524d83000fdb1eb00a1c34cc0f254a2 (diff)
downloaduhd-4e5dacc20770d557140cf196750326934e6e6b40.tar.gz
uhd-4e5dacc20770d557140cf196750326934e6e6b40.tar.bz2
uhd-4e5dacc20770d557140cf196750326934e6e6b40.zip
cmake: added IGNORE_BUILD_DATE option for reproducibility
Diffstat (limited to 'host/cmake/Modules')
-rw-r--r--host/cmake/Modules/UHDBuildInfo.cmake14
1 files changed, 9 insertions, 5 deletions
diff --git a/host/cmake/Modules/UHDBuildInfo.cmake b/host/cmake/Modules/UHDBuildInfo.cmake
index bc30b99ee..c64f748ae 100644
--- a/host/cmake/Modules/UHDBuildInfo.cmake
+++ b/host/cmake/Modules/UHDBuildInfo.cmake
@@ -1,5 +1,5 @@
#
-# Copyright 2015 National Instruments Corp.
+# Copyright 2015-2016 National Instruments Corp.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,10 +24,14 @@ MACRO(UHD_LOAD_BUILD_INFO)
MESSAGE(STATUS "Loading build info.")
# Build date
- EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
- "import time; print(time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime()))"
- OUTPUT_VARIABLE UHD_BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE
- )
+ IF(IGNORE_BUILD_DATE)
+ SET(UHD_BUILD_DATE "")
+ ELSE()
+ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
+ "import time; print(time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime()))"
+ OUTPUT_VARIABLE UHD_BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ ENDIF(IGNORE_BUILD_DATE)
# Compiler name
IF(MSVC)