1
0

Should now compile in clang 3.0

This commit is contained in:
worktycho 2014-09-06 14:38:47 +01:00
parent 29910bc3bd
commit f22b9aa5f4

View File

@ -223,17 +223,28 @@ macro(set_exe_flags)
add_flags_cxx("-ffast-math")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if (CLANG_VERSION_STRING VERSION_LESS 3.0)
message(FATAL_ERROR "MCServer requires clang version 3.0 or higher")
endif()
# clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math
add_flags_cxx("-D__extern_always_inline=inline")
add_flags_cxx("-Werror -Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion")
add_flags_cxx("-Wno-error=switch-enum -Wno-documentation -Wno-exit-time-destructors")
add_flags_cxx("-Wno-error=switch-enum -Wno-exit-time-destructors")
add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-padded")
add_flags_cxx("-Wno-error=deprecated -Wno-error=weak-vtables -Wno-error=float-equal")
add_flags_cxx("-Wno-error=missing-prototypes -Wno-error=non-virtual-dtor")
add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=shadow -Wno-error=old-style-cast")
add_flags_cxx("-Wno-error=exit-time-destructors -Wno-error=missing-variable-declarations")
add_flags_cxx("-Wno-error=global-constructors -Wno-implicit-fallthrough")
add_flags_cxx("-Wno-error=extra-semi -Wno-weak-vtables -Wno-switch-enum")
add_flags_cxx("-Wno-error=shadow -Wno-error=old-style-cast -Wno-error=global-constructors")
add_flags_cxx("-Wno-error=exit-time-destructors")
add_flags_cxx("-Wno-weak-vtables -Wno-switch-enum")
if (CLANG_VERSION_STRING VERSION_MORE 3.0)
# flags that are not present in 3.0
add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=missing-variable-declarations")
add_flags_cxx("-Wno-implicit-fallthrough -Wno-error=extra-semi")
endif()
if (CLANG_VERSION_STRING VERSION_MORE 3.1)
# flags introduced in 3.2
add_flags_cxx("-Wno-documentation")
endif()
endif()
endif()