aboutsummaryrefslogtreecommitdiff
path: root/cmake/compiler
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-02-11 22:25:49 +0100
committerShauren <shauren.trinity@gmail.com>2022-02-11 22:25:49 +0100
commitbd4e5b6d0bb93ce153a5f37bdf121696f917c961 (patch)
treeaa2c7c460f16f378af7a951f398a1349031ce07c /cmake/compiler
parentfe35971d2f240898e01a38752c14398ebee2ac7a (diff)
Build: New CMake option -DBUILD_TIME_ANALYSIS=1 for clang (enables detailed compile time statistics that can be later viewed with ClangBuildAnalyzer)
Diffstat (limited to 'cmake/compiler')
-rw-r--r--cmake/compiler/clang/settings.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake
index 2b6e998d854..1f11cb4112e 100644
--- a/cmake/compiler/clang/settings.cmake
+++ b/cmake/compiler/clang/settings.cmake
@@ -125,6 +125,14 @@ if(TSAN)
message(STATUS "Clang: Enabled Thread Sanitizer TSan")
endif()
+if(BUILD_TIME_ANALYSIS)
+ target_compile_options(trinity-compile-option-interface
+ INTERFACE
+ -ftime-trace)
+
+ message(STATUS "Clang: Enabled build time analysis (-ftime-trace)")
+endif()
+
# -Wno-narrowing needed to suppress a warning in g3d
# -Wno-deprecated-register is needed to suppress 185 gsoap warnings on Unix systems.
# -Wno-deprecated-copy needed to suppress a warning in g3d