diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2011-05-11 13:53:30 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2011-05-11 13:53:30 +0000 |
commit | c5cd252aba2ce3d3a6719d487bfea03f47e1785b (patch) | |
tree | 8802f603aaa2b0a15a7b84ca3566a16abd8897d1 | |
parent | 1de85338543dd6228eb518185e385d94d377f4cb (diff) |
Handle gcc-compatible compilers (such as clang) the same way we handle
gcc.
Fixes PR9886.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131182 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | unittests/CMakeLists.txt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b54deaaf5..04e16547c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,7 @@ configure_file( ${CMAKE_CURRENT_BINARY_DIR}/include/clang/Basic/Version.inc) # Add appropriate flags for GCC -if (CMAKE_COMPILER_IS_GNUCXX) +if (LLVM_COMPILER_IS_GCC_COMPATIBLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings") endif () diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index f7f495ee9d..cc2d5f4f83 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -36,7 +36,7 @@ set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests") include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include) add_definitions(-DGTEST_HAS_RTTI=0) -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-") |