summaryrefslogtreecommitdiffstats
path: root/SetFlags.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'SetFlags.cmake')
-rw-r--r--SetFlags.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/SetFlags.cmake b/SetFlags.cmake
index d3a6aba86..bde3be549 100644
--- a/SetFlags.cmake
+++ b/SetFlags.cmake
@@ -258,12 +258,13 @@ macro(set_exe_flags)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if ("${CLANG_VERSION}" VERSION_LESS 3.0)
- message(FATAL_ERROR "MCServer requires clang version 3.0 or higher, version is ${CLANG_VERSION}")
+ message(FATAL_ERROR "Cuberite requires clang version 3.0 or higher, your version is ${CLANG_VERSION}")
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("-Weverything -Werror -Wno-c++98-compat-pedantic -Wno-string-conversion")
add_flags_cxx("-Wno-exit-time-destructors -Wno-padded -Wno-weak-vtables")
+ add_flags_cxx("-Wno-switch-enum") # This is a pretty useless warning, we've already got -Wswitch which is what we need
if ("${CLANG_VERSION}" VERSION_GREATER 3.0)
# flags that are not present in 3.0
add_flags_cxx("-Wno-implicit-fallthrough")
@@ -288,6 +289,12 @@ macro(set_exe_flags)
if ("${CLANG_VERSION}" VERSION_GREATER 3.5)
add_flags_cxx("-Wno-error=disabled-macro-expansion")
endif()
+ if ("${CLANG_VERSION}" VERSION_GREATER 3.7)
+ check_cxx_compiler_flag(-Wno-double-promotion HAS_NO_DOUBLE_PROMOTION)
+ if (HAS_NO_DOUBLE_PROMOTION)
+ add_flags_cxx("-Wno-double-promotion")
+ endif()
+ endif()
add_flags_cxx("-Wno-error=unused-command-line-argument")
endif()
endif()