From 7a3b4a326300e48ef1df0610080b7cd97256a166 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 28 Aug 2022 17:44:42 -0600 Subject: [PATCH] cmake: add ERICWTOOLS_TIMETRACE option --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbee0b5e..716eac18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,11 @@ if (ERICWTOOLS_ASAN) add_link_options(-fsanitize=address) endif() +if (ERICWTOOLS_TIMETRACE) + message(STATUS "Enabling -ftime-trace") + add_compile_options(-ftime-trace) +endif() + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") add_compile_options(/EHsc) endif()