feat: Implement clang build analyzer (#2072)

Fix: https://github.com/XRPLF/clio/issues/936
This commit is contained in:
Ayaz Salikhov
2025-05-02 12:49:51 +01:00
committed by GitHub
parent c774a40a59
commit f2384a47f1
9 changed files with 112 additions and 27 deletions

View File

@@ -70,4 +70,12 @@ endif ()
# See https://github.com/cpp-best-practices/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#gcc--clang for
# the flags description
if (time_trace)
if (is_clang OR is_appleclang)
list(APPEND COMPILER_FLAGS -ftime-trace)
else ()
message(FATAL_ERROR "Clang or AppleClang is required to use `-ftime-trace`")
endif ()
endif ()
target_compile_options(clio_options INTERFACE ${COMPILER_FLAGS})