Skip to content

Commit 0855a7d

Browse files
Only for gcc is it misleading, clang is fine with release mode
1 parent f71aeed commit 0855a7d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ target_compile_features(nuclear PUBLIC cxx_std_14)
3939

4040
option(ENABLE_COVERAGE "Compile with coverage support enabled.")
4141
if(ENABLE_COVERAGE)
42-
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
43-
message(WARNING "Coverage is enabled but not build in debug mode. Coverage results may be misleading.")
44-
endif()
4542
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
43+
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
44+
message(WARNING "Coverage is enabled but not build in debug mode. Coverage results may be misleading.")
45+
endif()
4646
target_compile_options(nuclear PUBLIC -fprofile-arcs -ftest-coverage -fprofile-abs-path -fprofile-update=atomic)
4747
target_link_options(nuclear PUBLIC -fprofile-arcs)
4848
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")

0 commit comments

Comments
 (0)