From 7459388dd90b7fa0f94bd09ebc80c4444addbbd4 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 13 Dec 2017 15:16:03 +0300 Subject: [PATCH] cmake: update timestamp status - avoid unnecessary rebuilding of OpenCV libraries - use timestamp of the first launch of CMake - to return to previous behavior use `-UOPENCV_TIMESTAMP` CMake option original commit: 3e45795232c34f45769a90c2d03482947af4084d --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa585b20b7..90e16c2a57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -683,6 +683,16 @@ endif() # ========================== build platform ========================== status("") status(" Platform:") +if(NOT DEFINED OPENCV_TIMESTAMP + AND NOT CMAKE_VERSION VERSION_LESS 2.8.11 + AND NOT BUILD_INFO_SKIP_TIMESTAMP +) + string(TIMESTAMP OPENCV_TIMESTAMP "" UTC) + set(OPENCV_TIMESTAMP "${OPENCV_TIMESTAMP}" CACHE STRING "Timestamp of OpenCV build configuration" FORCE) +endif() +if(OPENCV_TIMESTAMP) + status(" Timestamp:" ${OPENCV_TIMESTAMP}) +endif() status(" Host:" ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_VERSION} ${CMAKE_HOST_SYSTEM_PROCESSOR}) if(CMAKE_CROSSCOMPILING) status(" Target:" ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR})