Last active
October 1, 2023 18:26
-
-
Save esnosy/f2c762ab3c811e88c404613182676ffb to your computer and use it in GitHub Desktop.
CMake snipped to enable ASAN for MSVC and non-MSVC in Debug config correctly π
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(MSVC) | |
target_compile_options(eigen_vis_cpp PRIVATE $<$<CONFIG:RelWithDebInfo,Debug>:/fsanitize=address>) | |
elseif() | |
target_compile_options(eigen_vis_cpp PRIVATE $<$<CONFIG:RelWithDebInfo,Debug>:-fsanitize=address -fno-omit-frame-pointer>) | |
target_link_options(eigen_vis_cpp PRIVATE $<$<CONFIG:RelWithDebInfo,Debug>-fsanitize=address>) | |
endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment