CMake/MSVC: Disable ASAN for developer builds

ASAN is more often broken than working depending on the MSVC version
you have. As it is causing too many support incidents of people that
unknowingly turned ASAN on by running `make developer` and running
into issues starting blender due to the broken ASAN support in MSVC.

This commit changes the default not enable it for MSVC in the
developer profile. Devs that still want to enable it can do so though
turning WITH_COMPILER_ASAN on in their CMakeCache.txt or by running
`make developer asan`
This commit is contained in:
Ray molenkamp 2022-11-01 12:46:15 -06:00
parent f66236a827
commit f8699881d6
1 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,11 @@
set(WITH_ASSERT_ABORT ON CACHE BOOL "" FORCE)
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE)
# Sadly ASAN is more often broken than working with MSVC do not enable it in the
# developer profile for now.
if(NOT WIN32)
set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE)
endif()
set(WITH_CYCLES_NATIVE_ONLY ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
set(WITH_GTESTS ON CACHE BOOL "" FORCE)