bumped minimum supported GCC version to 4.8 (#3768)
This commit is contained in:
parent
47e9ed6e06
commit
a15a227b73
|
@ -5,6 +5,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
include(cmake/compilerCheck.cmake)
|
||||
include(cmake/versions.cmake)
|
||||
include(cmake/options.cmake)
|
||||
include(cmake/findDependencies.cmake)
|
||||
|
|
16
cli/main.cpp
16
cli/main.cpp
|
@ -112,19 +112,3 @@ int main(int argc, char* argv[])
|
|||
#endif
|
||||
// *INDENT-ON*
|
||||
}
|
||||
|
||||
|
||||
// Warn about deprecated compilers
|
||||
#ifdef __clang__
|
||||
# if (__clang_major__ < 2 || (__clang_major__ == 2 && __clang_minor__ < 9))
|
||||
# warning "Using Clang 2.8 or earlier. Support for this version has been removed."
|
||||
# endif
|
||||
#elif defined(__GNUC__)
|
||||
# if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6))
|
||||
# warning "Using GCC 4.5 or earlier. Support for this version has been removed."
|
||||
# endif
|
||||
#elif defined(_MSC_VER)
|
||||
# if (_MSC_VER < 1800)
|
||||
# pragma message("WARNING: Using Visual Studio 2012 or earlier. Support for this version has been removed.")
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
|
||||
message(ERROR "GCC >= 4.8 required - detected ${CMAKE_CXX_COMPILER_VERSION} not supported")
|
||||
endif ()
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# TODO: verify this
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.9)
|
||||
message(ERROR "Clang >= 2.9 required - detected ${CMAKE_CXX_COMPILER_VERSION} not supported")
|
||||
endif ()
|
||||
elseif(MSVC)
|
||||
if (MSVC_VERSION VERSION_LESS 1800)
|
||||
message(ERROR "Visual Studio >= 2013 (1800) required - detected ${MSVC_VERSION} not supported")
|
||||
endif ()
|
||||
endif()
|
|
@ -46,10 +46,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang"
|
|||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
|
||||
message(FATAL_ERROR "${PROJECT_NAME} c++11 support requires g++ 4.6 or greater, but it is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif ()
|
||||
|
||||
add_compile_options(-Woverloaded-virtual) # when a function declaration hides virtual functions from a base class
|
||||
add_compile_options(-Wno-maybe-uninitialized) # there are some false positives
|
||||
add_compile_options(-Wsuggest-attribute=noreturn)
|
||||
|
|
|
@ -56,9 +56,9 @@ This is not just a tool for mainstream gcc/msvc c/c++ developers. If you can com
|
|||
|
||||
## C++ language
|
||||
|
||||
Our goal is to be highly portable. Users must be able to compile Cppcheck with GCC 4.6 or MSVS 2013.
|
||||
Our goal is to be highly portable. Users must be able to compile Cppcheck with GCC 4.8 or Visual Studio 2013.
|
||||
|
||||
No C++14 is allowed. A subset of the C++11 is allowed.
|
||||
No C++14 is allowed. A subset of C++11 is allowed.
|
||||
|
||||
|
||||
## Avoid dependencies
|
||||
|
|
|
@ -27,7 +27,7 @@ You can stop the script whenever you like with Ctrl C.
|
|||
|
||||
## Compiling
|
||||
|
||||
Any C++11 compiler should work. For compilers with partial C++11 support it may work. If your compiler has the C++11 features that are available in Visual Studio 2013 / GCC 4.6 then it will work.
|
||||
Any C++11 compiler should work. For compilers with partial C++11 support it may work. If your compiler has the C++11 features that are available in Visual Studio 2013 / GCC 4.8 then it will work.
|
||||
|
||||
To build the GUI, you need Qt.
|
||||
|
||||
|
@ -39,7 +39,7 @@ There are multiple compilation choices:
|
|||
* Windows: Visual Studio (VS 2013 and above)
|
||||
* Windows: Qt Creator + mingw
|
||||
* gnu make
|
||||
* g++ 4.6 (or later)
|
||||
* g++ 4.8 (or later)
|
||||
* clang++
|
||||
|
||||
### cmake
|
||||
|
|
|
@ -15,7 +15,7 @@ Manual
|
|||
Compiling
|
||||
|
||||
Any C++11 compiler should work. For compilers with partial C++11 support it may work. If
|
||||
your compiler has the C++11 features that are available in Visual Studio 2013 / GCC 4.6
|
||||
your compiler has the C++11 features that are available in Visual Studio 2013 / GCC 4.8
|
||||
then it will work.
|
||||
|
||||
To build the GUI, you need Qt.
|
||||
|
@ -36,7 +36,7 @@ Compiling
|
|||
* Windows: Visual Studio
|
||||
* Windows: Qt Creator + mingw
|
||||
* gnu make
|
||||
* g++ 4.6 (or later)
|
||||
* g++ 4.8 (or later)
|
||||
* clang++
|
||||
|
||||
cmake
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
## ビルド
|
||||
|
||||
C++11に対応したコンパイラが利用できます。部分的にC++11にサポートしたコンパイラも利用できるかもしれません。もし、あなたのコンパイラがVisual Studio 2013や GCC 4.6で利用できるC++11機能がサポートされているなら、そのコンパイラが利用できます。
|
||||
C++11に対応したコンパイラが利用できます。部分的にC++11にサポートしたコンパイラも利用できるかもしれません。もし、あなたのコンパイラがVisual Studio 2013や GCC 4.8で利用できるC++11機能がサポートされているなら、そのコンパイラが利用できます。
|
||||
|
||||
GUIも利用する場合、Qtライブラリが必要です。
|
||||
|
||||
|
@ -28,7 +28,7 @@ GUIも利用する場合、Qtライブラリが必要です。
|
|||
* Windows: Visual Studio (VS 2013 またはそれ以上)
|
||||
* Windows: Qt Creator + mingw
|
||||
* gnu make
|
||||
* g++ 4.6 (またはそれ以上)
|
||||
* g++ 4.8 (またはそれ以上)
|
||||
* clang++
|
||||
|
||||
### cmake
|
||||
|
|
Loading…
Reference in New Issue