Allow compile with clang 3.8 with warning (#1021)

* Fix missing includes

* clean

* Allow compile with clang 3.8 with warning

* Add message
This commit is contained in:
proller 2017-07-24 20:18:23 +03:00 committed by alexey-milovidov
parent d3159ed2c5
commit 6692fd453f
1 changed files with 5 additions and 2 deletions

View File

@ -9,9 +9,12 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
message (FATAL_ERROR "GCC version must be at least 6! For example, if GCC 6 is available under gcc-6, g++-6 names, do the following: export CC=gcc-6 CXX=g++-6; rm -rf CMakeCache.txt CMakeFiles; and re run cmake or ./release.")
endif ()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# Require at least clang 4
# Require at least clang 3.8
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8)
message (FATAL_ERROR "Clang version must be at least 3.8! Recommended 4+")
endif ()
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)
message (FATAL_ERROR "Clang version must be at least 4!")
message (WARNING "Compilation has only been tested with Clang 4+")
endif ()
else ()
message (WARNING "You are using an unsupported compiler! Compilation has only been tested with Clang 4+ and GCC 6+.")