Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 0 additions & 16 deletions cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 14 additions & 0 deletions cmake/compilerCheck.cmake
Original file line number Diff line number Diff line change
@@ -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()
4 changes: 0 additions & 4 deletions cmake/compileroptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions philosophy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions readmeja.md
Original file line number Diff line number Diff line change
Expand Up @@ -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ライブラリが必要です。

Expand All @@ -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
Expand Down