Handle gcc-compatible compilers (such as clang) the same way we handle

gcc.

Fixes PR9886.

llvm-svn: 131182
This commit is contained in:
Oscar Fuentes 2011-05-11 13:53:30 +00:00
parent ab84a7bf73
commit cfc9efa43e
2 changed files with 2 additions and 2 deletions

View File

@ -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 ()

View File

@ -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-")