mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 16:56:39 +00:00
CMake (MSVC): cmake automatically adds the /EHsc and /GR compiler
options. If we are building with exceptions/rtti disabled, we replace /EHsc with /EHs-c- and /GR with /GR-, respectively. If we just add the disabling options we get warnings like this: cl : Command line warning D9025 : overriding '/EHs' with '/EHs-' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122648 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8a3d29cf10
commit
023c63351e
@ -42,7 +42,7 @@ function(llvm_process_sources OUT_VAR)
|
|||||||
if( CMAKE_COMPILER_IS_GNUCXX )
|
if( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
add_definitions( -fno-exceptions )
|
add_definitions( -fno-exceptions )
|
||||||
elseif( MSVC )
|
elseif( MSVC )
|
||||||
add_definitions( /EHs-c- )
|
string( REGEX REPLACE "[ ^]/EHsc ?" " /EHs-c- " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" )
|
||||||
add_definitions( /D_HAS_EXCEPTIONS=0 )
|
add_definitions( /D_HAS_EXCEPTIONS=0 )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@ -50,7 +50,7 @@ function(llvm_process_sources OUT_VAR)
|
|||||||
if( CMAKE_COMPILER_IS_GNUCXX )
|
if( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
add_definitions( -fno-rtti )
|
add_definitions( -fno-rtti )
|
||||||
elseif( MSVC )
|
elseif( MSVC )
|
||||||
add_definitions( /GR- )
|
string( REGEX REPLACE "[ ^]/GR ?" " /GR- " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user