Commit f255e6ae authored by GILLES Sebastien's avatar GILLES Sebastien

#1288 Reintroduce address sanitizer.

parent 79a2c59e
......@@ -118,6 +118,14 @@ else()
endif()
if(MOREFEM_ASAN)
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
endif()
set(MOREFEM_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/MoReFEM)
set(MOREFEM_INSTALL_DIR_EXE ${MOREFEM_INSTALL_DIR}/bin)
......
set(CMAKE_INSTALL_PREFIX /placeholder_value CACHE PATH "Installation directory for executables and libraries. A MoReFEM folder will be created there when install is invoked. This value should be overridden in command line!")
set(MOREFEM_ASAN True CACHE BOOL "If true address sanitizer is enabled.")
set(MOREFEM_THIRD_PARTY_LIBRARIES_DIR /media/suppl_drive/opt)
set(CMAKE_C_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpicc CACHE FILEPATH "C compiler. Prefer to use an openmpi wrapper.")
......
......@@ -2,6 +2,8 @@ set(CMAKE_INSTALL_PREFIX /placeholder_value CACHE PATH "Installation directory f
set(MOREFEM_THIRD_PARTY_LIBRARIES_DIR /opt/gcc)
set(MOREFEM_ASAN False CACHE BOOL "If true address sanitizer is enabled.")
set(CMAKE_C_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpicc CACHE FILEPATH "C compiler. Prefer to use an openmpi wrapper.")
set(CMAKE_CXX_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpic++ CACHE FILEPATH "C++ compiler. Prefer to use an openmpi wrapper.")
......
......@@ -2,6 +2,8 @@ set(CMAKE_INSTALL_PREFIX /placeholder_value CACHE PATH "Installation directory f
set(MOREFEM_THIRD_PARTY_LIBRARIES_DIR /Volumes/Data/opt)
set(MOREFEM_ASAN False CACHE BOOL "If true address sanitizer is enabled.")
set(CMAKE_C_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpicc CACHE FILEPATH "C compiler. Prefer to use an openmpi wrapper.")
set(CMAKE_CXX_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpic++ CACHE FILEPATH "C++ compiler. Prefer to use an openmpi wrapper.")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment