diff options
author | Shauren <shauren.trinity@gmail.com> | 2022-02-11 22:25:49 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-02-11 22:25:49 +0100 |
commit | bd4e5b6d0bb93ce153a5f37bdf121696f917c961 (patch) | |
tree | aa2c7c460f16f378af7a951f398a1349031ce07c /cmake | |
parent | fe35971d2f240898e01a38752c14398ebee2ac7a (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')
-rw-r--r-- | cmake/compiler/clang/settings.cmake | 8 |
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 |