diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-13 07:02:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-13 07:04:17 +0300 |
commit | b84db342a57bb7ff94f78a3c9c142abab4dce11a (patch) | |
tree | 664c2660f30765ee02b65561d8bef23ebeee5b2d /intern/elbeem/CMakeLists.txt | |
parent | af3f0bf9d4f0d9f2be0404da5d7746eb8a57c176 (diff) |
Fix build errors with older GCC versions like 4.9
We can add more fine grained checks for when these flags are supported so
that adding asan flags manually still has all the workarounds, but for now
compiling succesfully is more important.
Diffstat (limited to 'intern/elbeem/CMakeLists.txt')
-rw-r--r-- | intern/elbeem/CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/intern/elbeem/CMakeLists.txt b/intern/elbeem/CMakeLists.txt index 383cfa66c15..63a6af84323 100644 --- a/intern/elbeem/CMakeLists.txt +++ b/intern/elbeem/CMakeLists.txt @@ -120,9 +120,11 @@ else() endif() # Work around hang with GCC and ASAN. -if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-sanitize=vptr") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-sanitize=vptr") +if(WITH_COMPILER_ASAN) + if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-sanitize=vptr") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-sanitize=vptr") + endif() endif() blender_add_lib_nolist(bf_intern_elbeem "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") |