aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-12-10 17:32:13 -0800
committerAlexander Blair <snipa@jagtech.io>2020-12-10 17:32:13 -0800
commitddf59289d63766a2cab2047d8308f3d91198ea0d (patch)
tree582cae5a74f1bdddaa18a211ff718fe8b5b3e060 /CMakeLists.txt
parentMerge pull request #6947 (diff)
parentAdd ClangBuildAnalyzer under utils/health for analyzing build times (diff)
downloadmonero-ddf59289d63766a2cab2047d8308f3d91198ea0d.tar.xz
Merge pull request #6956
9f502108b Add ClangBuildAnalyzer under utils/health for analyzing build times (mj-xmr)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 050269218..c09b9b39a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,6 +54,13 @@ if (USE_CCACHE)
else()
message(STATUS "ccache deselected")
endif()
+option (USE_COMPILATION_TIME_PROFILER "Use compilation time profiler (for CLang >= 9 only)" OFF)
+if (USE_COMPILATION_TIME_PROFILER)
+ if (NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+ message(FATAL_ERROR "The flag USE_COMPILATION_TIME_PROFILER is meant to be set only for CLang compiler!")
+ endif()
+ add_compile_options("-ftime-trace")
+endif()
if (${CMAKE_VERSION} VERSION_GREATER "3.0.0" AND CMAKE_MAKE_PROGRAM MATCHES "ninja")
set(MONERO_PARALLEL_COMPILE_JOBS "" CACHE STRING "The maximum number of concurrent compilation jobs.")