Make the GCC warning flags passed by CMake the same as the warning flags passed in the make build

llvm-svn: 82221
This commit is contained in:
Douglas Gregor 2009-09-18 14:47:57 +00:00
parent cd92d24a4f
commit bd1af01fcd
1 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,13 @@ string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
${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)