Skip to content

Commit

Permalink
build(cmake): link sanitizer if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Codesire-Deng committed Dec 30, 2023
1 parent 1e5d589 commit ec4f042
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/Develop.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if(ENABLE_SANITIZER AND NOT MSVC)
target_compile_options(co_context
PUBLIC -fsanitize=undefined,address,leak
PUBLIC -fno-omit-frame-pointer)
target_link_options(co_context
PUBLIC -fsanitize=undefined,address,leak)
else()
message(WARNING "sanitizer is no supported with current tool-chains")
endif()
Expand Down

0 comments on commit ec4f042

Please sign in to comment.