Skip to content

Commit

Permalink
update condition for legacy coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
galabovaa committed Jan 8, 2025
1 parent df7ca0a commit dee9dc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ if(FAST_BUILD AND HIGHS_COVERAGE)
# Enable coverage flags
add_compile_options(-O0)
add_compile_options(--coverage)
add_compile_options(-fprofile-update=atomic)
# add_compile_options(-fprofile-update=atomic)

add_link_options(-O0)
add_link_options(--coverage) # Ensure coverage data is linked correctly
Expand Down Expand Up @@ -551,7 +551,7 @@ if(NOT FAST_BUILD)
endif()

if(HIGHS_COVERAGE)
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT CMAKE_BUILD_TYPE STREQUAL "DEBUG")
message(FATAL_ERROR "Warning: to enable coverage, you must compile in DEBUG mode")
endif()
endif()
Expand Down

0 comments on commit dee9dc1

Please sign in to comment.