summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2010-12-31 19:10:49 +0000
committerOscar Fuentes <ofv@wanadoo.es>2010-12-31 19:10:49 +0000
commiteb6d7778828c3010940cd246127e10b5feee7676 (patch)
tree4468a6e71ec4484c32f419f3bf34b77d4b874bb6 /llvm/cmake
parent2c440fa403bca9bc1f153b204c1867618606ed2f (diff)
downloadbcm5719-llvm-eb6d7778828c3010940cd246127e10b5feee7676.tar.gz
bcm5719-llvm-eb6d7778828c3010940cd246127e10b5feee7676.zip
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-' llvm-svn: 122648
Diffstat (limited to 'llvm/cmake')
-rw-r--r--llvm/cmake/modules/LLVMProcessSources.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/cmake/modules/LLVMProcessSources.cmake b/llvm/cmake/modules/LLVMProcessSources.cmake
index 7bfca207f68..d9c14fbe837 100644
--- a/llvm/cmake/modules/LLVMProcessSources.cmake
+++ b/llvm/cmake/modules/LLVMProcessSources.cmake
@@ -42,7 +42,7 @@ function(llvm_process_sources OUT_VAR)
if( CMAKE_COMPILER_IS_GNUCXX )
add_definitions( -fno-exceptions )
elseif( MSVC )
- add_definitions( /EHs-c- )
+ string( REGEX REPLACE "[ ^]/EHsc ?" " /EHs-c- " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" )
add_definitions( /D_HAS_EXCEPTIONS=0 )
endif()
endif()
@@ -50,7 +50,7 @@ function(llvm_process_sources OUT_VAR)
if( CMAKE_COMPILER_IS_GNUCXX )
add_definitions( -fno-rtti )
elseif( MSVC )
- add_definitions( /GR- )
+ string( REGEX REPLACE "[ ^]/GR ?" " /GR- " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" )
endif()
endif()
OpenPOWER on IntegriCloud