aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-01-19 15:51:35 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-01-22 15:58:05 +0000
commit6ce835fc7af4e6b58b4eea9da9587a7fd75a2ddc (patch)
tree2d14bd7217538bdc4bb3a9c3473318d883edbc42 /cmake
parent9a683152c3f59564e84f7aeca37eb0fd7981d219 (diff)
downloadrspamd-6ce835fc7af4e6b58b4eea9da9587a7fd75a2ddc.tar.gz
rspamd-6ce835fc7af4e6b58b4eea9da9587a7fd75a2ddc.zip
[Minor] Allow timestamping of the compilation
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Toolset.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/Toolset.cmake b/cmake/Toolset.cmake
index 10f682915..d54abb795 100644
--- a/cmake/Toolset.cmake
+++ b/cmake/Toolset.cmake
@@ -1,6 +1,7 @@
option (ENABLE_FAST_MATH "Build rspamd with fast math compiler flag [default: ON]" ON)
option (ENABLE_ANALYZER "Build rspamd with static analyzer [default: OFF]" OFF)
option (ENABLE_STATIC_LIBCXX "Build rspamd with static lib(std)c++ [default: OFF]" OFF)
+option (ENABLE_COMPILE_TIME "Show compile time [default: OFF]" OFF)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
SET (COMPILER_GCC 1)
@@ -199,6 +200,10 @@ if (ENABLE_STATIC_LIBCXX MATCHES "ON")
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libstdc++")
endif()
+if (ENABLE_COMPILE_TIME MATCHES "ON")
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "/usr/bin/time")
+endif()
+
message (STATUS "Final CFLAGS: ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
message (STATUS "Final CXXFLAGS: ${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
message (STATUS "Final link flags for shlib: ${CMAKE_SHARED_LINKER_FLAGS}")