CMake: Don’t add compiler flags as preprocessor definitions.

This commit is contained in:
Frederich Munch 2017-02-19 20:06:42 -05:00 committed by sftnight
parent 08ee69e724
commit 02d00992e0

View File

@ -209,11 +209,16 @@ endif ()
# Lots of cling is needed at runtime (e.g. Value, or Interpreter::Evaluate()).
# The JIT needs to be able to resolve these symbols from cling; unhide them.
string(REPLACE "-fvisibility=hidden" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
# The package needs to be compiler without RTTI information
if(MSVC)
add_definitions(/GR- /DNOMINMAX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
else()
add_definitions(-fno-rtti)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
endif()
if(MSVC)
add_definitions(/DNOMINMAX)
endif()
if (APPLE)