Enable support for KICAD_SANITIZE_ADDRESS CMake flag on MSVC.

This commit is contained in:
Alex 2023-06-10 02:09:09 +03:00
parent 8f1b9119bf
commit d5edde799c
1 changed files with 6 additions and 0 deletions

View File

@ -497,6 +497,12 @@ if( MSVC )
string( APPEND CMAKE_CXX_FLAGS " /EHs" )
endif()
if( KICAD_SANITIZE_ADDRESS )
add_definitions( -DKICAD_SANITIZE_ADDRESS )
add_definitions( -D_DISABLE_VECTOR_ANNOTATION )
string( APPEND CMAKE_CXX_FLAGS " /fsanitize=address" )
endif()
foreach( type EXE SHARED MODULE)
# /DEBUG: create PDB
string( APPEND CMAKE_${type}_LINKER_FLAGS " /DEBUG /MANIFEST:NO" )