Add DESKTOP_APP_ASAN option for MSVC.
This commit is contained in:
parent
e48df0b2ce
commit
82f379f3e5
2 changed files with 19 additions and 0 deletions
|
|
@ -51,6 +51,17 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
$<$<BOOL:${DESKTOP_APP_NO_PDB}>:/DEBUG:NONE>
|
$<$<BOOL:${DESKTOP_APP_NO_PDB}>:/DEBUG:NONE>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_ASAN)
|
||||||
|
target_compile_options(common_options INTERFACE /fsanitize=address)
|
||||||
|
|
||||||
|
# https://developercommunity.visualstudio.com/t/Linker-error-LNK2038-when-using-Parallel/10512721
|
||||||
|
target_compile_definitions(common_options
|
||||||
|
INTERFACE
|
||||||
|
_DISABLE_VECTOR_ANNOTATION
|
||||||
|
_DISABLE_STRING_ANNOTATION
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (build_win64)
|
if (build_win64)
|
||||||
target_compile_options(common_options
|
target_compile_options(common_options
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ option(DESKTOP_APP_USE_PACKAGED_RLOTTIE "Find rlottie using CMake instead of bun
|
||||||
option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no_special_target})
|
option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no_special_target})
|
||||||
option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate})
|
option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate})
|
||||||
option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF)
|
option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF)
|
||||||
|
option(DESKTOP_APP_ASAN "Enable address sanitizer" OFF)
|
||||||
cmake_dependent_option(DESKTOP_APP_USE_ENCHANT "Use Enchant instead of bundled Hunspell." OFF LINUX OFF)
|
cmake_dependent_option(DESKTOP_APP_USE_ENCHANT "Use Enchant instead of bundled Hunspell." OFF LINUX OFF)
|
||||||
cmake_dependent_option(DESKTOP_APP_USE_CLD3 "Disable system text language recognition and use bundled cld3 only." OFF APPLE ON)
|
cmake_dependent_option(DESKTOP_APP_USE_CLD3 "Disable system text language recognition and use bundled cld3 only." OFF APPLE ON)
|
||||||
cmake_dependent_option(DESKTOP_APP_NO_PDB "Disable PDB file generation." OFF WIN32 OFF)
|
cmake_dependent_option(DESKTOP_APP_NO_PDB "Disable PDB file generation." OFF WIN32 OFF)
|
||||||
|
|
@ -88,6 +89,13 @@ else()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#if (DESKTOP_APP_ASAN AND WIN32)
|
||||||
|
# if (build_win64)
|
||||||
|
# get_filename_component(libs_loc "../Libraries/asan-win64" REALPATH)
|
||||||
|
# else()
|
||||||
|
# get_filename_component(libs_loc "../Libraries/asan" REALPATH)
|
||||||
|
# endif()
|
||||||
|
#elseif (build_win64)
|
||||||
if (build_win64)
|
if (build_win64)
|
||||||
get_filename_component(libs_loc "../Libraries/win64" REALPATH)
|
get_filename_component(libs_loc "../Libraries/win64" REALPATH)
|
||||||
else()
|
else()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue