Commit 72ffa4ea authored by GILLES Sebastien's avatar GILLES Sebastien

#1340 CMake: in pre-cache files, introduced new macro...

#1340 CMake: in pre-cache files, introduced new macro MOREFEM_NO_TRAP_SNES_EXCEPTION and remove the one related to sanitizer.
parent fbb1f394
......@@ -114,17 +114,6 @@ else()
endif()
if (${MOREFEM_DO_SANITIZE})
add_cxx_compiler_flag("-fno-omit-frame-pointer")
add_cxx_compiler_flag("-fsanitize=address")
add_cxx_compiler_flag("-fsanitize=leak")
if(LIBRARY_TYPE MATCHES SHARED) # See limitations on https://clang.llvm.org/docs/MemorySanitizer.html
add_cxx_compiler_flag("-fsanitize=memory")
endif()
endif()
set(MOREFEM_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/MoReFEM)
set(MOREFEM_INSTALL_DIR_EXE ${MOREFEM_INSTALL_DIR}/bin)
......
......@@ -9,9 +9,6 @@ set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard; at least 17 is expected.")
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE STRING "Leave this one active.")
set(CMAKE_CXX_EXTENSIONS OFF CACHE STRING "If ON you might be using gnu++17; with OFF you'll use c++17.")
set(MOREFEM_DO_SANITIZE False CACHE BOOL "If true, sanitizer options -fsanitize=address, -fsanitize=memory and -fno-omit-frame-pointer are added.")
set(LIBRARY_TYPE STATIC CACHE BOOL "Choose either STATIC or SHARED.")
set(BUILD_MOREFEM_UNIQUE_LIBRARY True CACHE BOOL "Whether a unique library is built for MoReFEM core libraries or on the contrary if it is splitted in modules.")
......@@ -19,6 +16,8 @@ set(BUILD_MOREFEM_UNIQUE_LIBRARY True CACHE BOOL "Whether a unique library is bu
set(MOREFEM_CHECK_UPDATE_GHOSTS_CALL_RELEVANCE False CACHE BOOL "If true, add a (costly) method that gives an hint whether an UpdateGhost() call was relevant or not.")
set(MOREFEM_EXTENDED_TIME_KEEP False CACHE BOOL "If true, TimeKeep gains the ability to track times between each call of PrintTimeElapsed(). If not, PrintTimeElapsed() is flatly ignored. False is the best choice in production!")
set(MOREFEM_NO_TRAP_SNES_EXCEPTION False CACHE BOOL "If true, exceptions aren't caught in the three SNES functions I have to define for a Petsc Newton (at least the default ones; if you define your own it's up to you to introduce the macro in your code). If not caught, an eventual exception will be written properly but the exception is not guaranteed to be caught and it might result in a rather messy output. I therefore advise not to set it to True in debug mode; in release mode it is ok to do so as such exceptios are rare.")
set(OPEN_MPI_INCL_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/include CACHE PATH "Include directory of Openmpi library.")
set(OPEN_MPI_LIB_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/lib CACHE PATH "Lib directory of Openmpi library." )
......
......@@ -5,8 +5,6 @@ set(MOREFEM_THIRD_PARTY_LIBRARIES_DIR /Volumes/Data/opt)
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.")
set(MOREFEM_DO_SANITIZE False CACHE BOOL "If true, sanitizer options -fsanitize=address, -fsanitize=memory and -fno-omit-frame-pointer are added.")
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard; at least 17 is expected.")
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE STRING "Leave this one active.")
set(CMAKE_CXX_EXTENSIONS OFF CACHE STRING "If ON you might be using gnu++17; with OFF you'll use c++17.")
......@@ -18,6 +16,8 @@ set(BUILD_MOREFEM_UNIQUE_LIBRARY True CACHE BOOL "Whether a unique library is bu
set(MOREFEM_CHECK_UPDATE_GHOSTS_CALL_RELEVANCE False CACHE BOOL "If true, add a (costly) method that gives an hint whether an UpdateGhost() call was relevant or not.")
set(MOREFEM_EXTENDED_TIME_KEEP False CACHE BOOL "If true, TimeKeep gains the ability to track times between each call of PrintTimeElapsed(). If not, PrintTimeElapsed() is flatly ignored. False is the best choice in production!")
set(MOREFEM_NO_TRAP_SNES_EXCEPTION False CACHE BOOL "If true, exceptions aren't caught in the three SNES functions I have to define for a Petsc Newton (at least the default ones; if you define your own it's up to you to introduce the macro in your code). If not caught, an eventual exception will be written properly but the exception is not guaranteed to be caught and it might result in a rather messy output. I therefore advise not to set it to True in debug mode; in release mode it is ok to do so as such exceptios are rare.")
set(OPEN_MPI_INCL_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/include CACHE PATH "Include directory of Openmpi library.")
set(OPEN_MPI_LIB_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/lib CACHE PATH "Lib directory of Openmpi library." )
......
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