forked from OSchip/llvm-project
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:
parent
cd92d24a4f
commit
bd1af01fcd
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue