Skip to content

Commit

Permalink
added option for Sanitize (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigRazor authored Dec 2, 2024
1 parent b412384 commit 498a46f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ if(DEBUG)
)
endif(DEBUG)

option(SANITIZE "Enable Sanitize" OFF)
if(SANITIZE)
add_compile_options(
-fsanitize=address
-fsanitize=leak
)
add_link_options(
-fsanitize=address
-fsanitize=leak
)
endif(SANITIZE)

# set up CPM.cmake
if(CPM_SOURCE_CACHE)
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM.cmake")
Expand Down

0 comments on commit 498a46f

Please sign in to comment.