diff options
author | Sven Gothel <[email protected]> | 2021-01-03 19:18:03 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-01-03 19:18:03 +0100 |
commit | 690feccce0eb60792d662993f76ea7ccc21f5395 (patch) | |
tree | e6d0229ab6e5be5b2331537b1b2a78a3c0fd6a69 /CMakeLists.txt | |
parent | c2562c5d0afdba99bb913648d6302bb662527483 (diff) |
Disable RTTI for all builds with g++ (default), to ensure no RTTI is required
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f155e9b..3819ba0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,9 +35,9 @@ endif(CMAKE_COMPILER_IS_GNUCC) if(DEBUG) if(CMAKE_COMPILER_IS_GNUCC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -ggdb -DDEBUG -fno-omit-frame-pointer ${GCC_FLAGS_STACK}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -ggdb -DDEBUG -fno-omit-frame-pointer ${GCC_FLAGS_STACK} -fno-rtti") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DDEBUG") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DDEBUG -fno-rtti") endif(CMAKE_COMPILER_IS_GNUCC) if(INSTRUMENTATION) if(CMAKE_COMPILER_IS_GNUCC) @@ -53,16 +53,16 @@ if(DEBUG) endif(CMAKE_COMPILER_IS_GNUCC) endif(INSTRUMENTATION) elseif(GPROF) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -g -ggdb -pg") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -g -ggdb -pg -fno-rtti") elseif(PERF_ANALYSIS) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -g -ggdb") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -g -ggdb -fno-rtti") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fno-rtti") endif(DEBUG) # '-latomic' is required using gcc-8 on Raspberry ... to avoid: undefined reference to `__atomic_store_8' -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -latomic") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -latomic") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fno-rtti -latomic") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-rtti -latomic") set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Installation path for libraries") |