[cfe-commits] r131182 - in /cfe/trunk: CMakeLists.txt unittests/CMakeLists.txt
Oscar Fuentes
ofv at wanadoo.es
Wed May 11 06:53:30 PDT 2011
Author: ofv
Date: Wed May 11 08:53:30 2011
New Revision: 131182
URL: http://llvm.org/viewvc/llvm-project?rev=131182&view=rev
Log:
Handle gcc-compatible compilers (such as clang) the same way we handle
gcc.
Fixes PR9886.
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/unittests/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=131182&r1=131181&r2=131182&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Wed May 11 08:53:30 2011
@@ -103,7 +103,7 @@
${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 ()
Modified: cfe/trunk/unittests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/CMakeLists.txt?rev=131182&r1=131181&r2=131182&view=diff
==============================================================================
--- cfe/trunk/unittests/CMakeLists.txt (original)
+++ cfe/trunk/unittests/CMakeLists.txt Wed May 11 08:53:30 2011
@@ -36,7 +36,7 @@
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-")
More information about the cfe-commits
mailing list