summaryrefslogtreecommitdiff
path: root/cmake/modules/LLVMProcessSources.cmake
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-05-11 13:53:08 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-05-11 13:53:08 +0000
commit104e99256d951674faadd865ed44ec698ede31ea (patch)
treec19fd8882ddd16cf9fd9cee988cc20199104ace0 /cmake/modules/LLVMProcessSources.cmake
parent4301222525b565028850030835b8db9ce6d153db (diff)
downloadllvm-104e99256d951674faadd865ed44ec698ede31ea.tar.gz
llvm-104e99256d951674faadd865ed44ec698ede31ea.tar.bz2
llvm-104e99256d951674faadd865ed44ec698ede31ea.tar.xz
Handle gcc-compatible compilers (such as clang) the same way we handle
gcc. Fixes PR9886. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules/LLVMProcessSources.cmake')
-rw-r--r--cmake/modules/LLVMProcessSources.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/modules/LLVMProcessSources.cmake b/cmake/modules/LLVMProcessSources.cmake
index 270292ad3b..641f1b33e1 100644
--- a/cmake/modules/LLVMProcessSources.cmake
+++ b/cmake/modules/LLVMProcessSources.cmake
@@ -56,7 +56,7 @@ function(llvm_process_sources OUT_VAR)
# Set common compiler options:
if( NOT LLVM_REQUIRES_EH )
- if( CMAKE_COMPILER_IS_GNUCXX )
+ if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
add_definitions( -fno-exceptions )
elseif( MSVC )
llvm_replace_compiler_option(CMAKE_CXX_FLAGS "/EHsc" "/EHs-c-")
@@ -64,7 +64,7 @@ function(llvm_process_sources OUT_VAR)
endif()
endif()
if( NOT LLVM_REQUIRES_RTTI )
- if( CMAKE_COMPILER_IS_GNUCXX )
+ if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
llvm_replace_compiler_option(CMAKE_CXX_FLAGS "-frtti" "-fno-rtti")
elseif( MSVC )
llvm_replace_compiler_option(CMAKE_CXX_FLAGS "/GR" "/GR-")