CMake: Don’t add compiler flags as preprocessor definitions.
This commit is contained in:
parent
08ee69e724
commit
02d00992e0
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user