[cfe-commits] r82221 - /cfe/trunk/CMakeLists.txt

Douglas Gregor dgregor at apple.com
Fri Sep 18 07:47:57 PDT 2009


Author: dgregor
Date: Fri Sep 18 09:47:57 2009
New Revision: 82221

URL: http://llvm.org/viewvc/llvm-project?rev=82221&view=rev
Log:
Make the GCC warning flags passed by CMake the same as the warning flags passed in the make build

Modified:
    cfe/trunk/CMakeLists.txt

Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=82221&r1=82220&r2=82221&view=diff

==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Fri Sep 18 09:47:57 2009
@@ -14,6 +14,13 @@
   ${CLANG_VERSION_DATA})
 message(STATUS "Clang version: ${CLANG_VERSION}")
 
+# Add appropriate flags for GCC
+if (CMAKE_COMPILER_IS_GNUCXX)
+  # FIXME: Turn off exceptions, RTTI:
+  # -fno-exceptions -fno-rtti
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings")
+endif ()
+
 macro(add_clang_library name)
   set(srcs ${ARGN})
   if(MSVC_IDE OR XCODE)





More information about the cfe-commits mailing list