From fcda80fc33d0489a246f4e82c60e8c1e3f8e48b3 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 11 Sep 2019 17:58:34 -0700 Subject: [PATCH] record the timestamp on first configure (#4799) Summary: cmake doesn't re-generate the timestamp on subsequent builds causing rebuilds of the lib This improves compile time turn-arounds if you have rocksdb as a compileable library include, since with the state its now it will re-generate the time stamp .cc file each time you build, and thus re-compile + re-link the rocksdb library though anything in the source actually changed. The original timestamp is recorded into `CMakeCache.txt` and will remain there until you flush this cache. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4799 Differential Revision: D17290040 fbshipit-source-id: 28357fef3422693c9c19e88fa2873c8db0f662ed --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c6c566e8..db9e371aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,7 +135,8 @@ else() endif() endif() -string(TIMESTAMP GIT_DATE_TIME "%Y/%m/%d %H:%M:%S" UTC) +string(TIMESTAMP TS "%Y/%m/%d %H:%M:%S" UTC) +set(GIT_DATE_TIME "${TS}" CACHE STRING "the time we first built rocksdb") find_package(Git)