Skip to content

Commit 8e153db

Browse files
committed
bumped minimum required compiler versions to GCC 5.1 / Clang 3.5
1 parent a6bb813 commit 8e153db

4 files changed

Lines changed: 19 additions & 44 deletions

File tree

.github/workflows/CI-unixish-docker.yml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
strategy:
2121
matrix:
22-
image: ["centos:7", "ubuntu:14.04", "ubuntu:16.04", "ubuntu:18.04", "ubuntu:23.04"]
22+
image: ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:23.04"]
2323
fail-fast: false # Prefer quick result
2424

2525
runs-on: ubuntu-22.04
@@ -35,13 +35,6 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@v3
3737

38-
- name: Install missing software on CentOS 7
39-
if: matrix.image == 'centos:7'
40-
run: |
41-
yum install -y cmake gcc-c++ make pcre-devel
42-
yum --enablerepo=extras install -y epel-release
43-
yum install -y ccache
44-
4538
- name: Install missing software on ubuntu
4639
if: contains(matrix.image, 'ubuntu')
4740
run: |
@@ -59,46 +52,36 @@ jobs:
5952
# - it doesn't support centos
6053
- name: ccache
6154
uses: hendrikmuhs/ccache-action@v1.2
62-
if: matrix.image != 'ubuntu:14.04' # no support for --set-config
6355
with:
6456
key: ${{ github.workflow }}-${{ matrix.image }}
6557

66-
# tests require CMake 3.9 - no ccache available
67-
- name: CMake build (no tests / no ccache)
68-
if: matrix.image == 'ubuntu:14.04'
69-
run: |
70-
mkdir cmake.output
71-
cd cmake.output
72-
cmake -G "Unix Makefiles" -DHAVE_RULES=On ..
73-
cmake --build . -- -j$(nproc)
74-
7558
# tests require CMake 3.9 - ccache available
7659
- name: CMake build (no tests)
77-
if: matrix.image == 'centos:7' || matrix.image == 'ubuntu:16.04'
60+
if: matrix.image == 'ubuntu:16.04'
7861
run: |
7962
mkdir cmake.output
8063
cd cmake.output
8164
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
8265
cmake --build . -- -j$(nproc)
8366
8467
- name: CMake build
85-
if: matrix.image != 'centos:7' && matrix.image != 'ubuntu:14.04' && matrix.image != 'ubuntu:16.04'
68+
if: matrix.image != 'ubuntu:16.04'
8669
run: |
8770
mkdir cmake.output
8871
cd cmake.output
8972
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
9073
cmake --build . -- -j$(nproc)
9174
9275
- name: Run CMake test
93-
if: matrix.image != 'centos:7' && matrix.image != 'ubuntu:14.04' && matrix.image != 'ubuntu:16.04'
76+
if: matrix.image != 'ubuntu:16.04'
9477
run: |
9578
cmake --build cmake.output --target check -- -j$(nproc)
9679
9780
build_make:
9881

9982
strategy:
10083
matrix:
101-
image: ["centos:7", "ubuntu:14.04", "ubuntu:16.04", "ubuntu:18.04", "ubuntu:23.04"]
84+
image: ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:23.04"]
10285
fail-fast: false # Prefer quick result
10386

10487
runs-on: ubuntu-22.04
@@ -109,13 +92,6 @@ jobs:
10992
steps:
11093
- uses: actions/checkout@v3
11194

112-
- name: Install missing software on CentOS 7
113-
if: matrix.image == 'centos:7'
114-
run: |
115-
yum install -y gcc-c++ make which python3 pcre-devel
116-
yum --enablerepo=extras install -y epel-release
117-
yum install -y ccache
118-
11995
- name: Install missing software on ubuntu
12096
if: contains(matrix.image, 'ubuntu')
12197
run: |
@@ -127,7 +103,6 @@ jobs:
127103
# - it doesn't support centos
128104
- name: ccache
129105
uses: hendrikmuhs/ccache-action@v1.2
130-
if: matrix.image != 'ubuntu:14.04' # no support for --set-config
131106
with:
132107
key: ${{ github.workflow }}-${{ matrix.image }}
133108

cmake/compilerCheck.cmake

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
2-
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
3-
message(ERROR "GCC >= 4.8 required - detected ${CMAKE_CXX_COMPILER_VERSION} not supported")
2+
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
3+
message(ERROR "GCC >= 5.1 required - detected ${CMAKE_CXX_COMPILER_VERSION} not supported")
44
endif ()
55
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
6-
# TODO: verify this
7-
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.9)
8-
message(ERROR "Clang >= 2.9 required - detected ${CMAKE_CXX_COMPILER_VERSION} not supported")
6+
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
7+
message(ERROR "Clang >= 3.5 required - detected ${CMAKE_CXX_COMPILER_VERSION} not supported")
98
endif ()
109
elseif(MSVC)
1110
if (MSVC_VERSION VERSION_LESS 1800)

readme.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ You can stop the script whenever you like with Ctrl C.
2727

2828
## Compiling
2929

30-
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.
30+
Cppcheck requires a C++ compiler with (partial) C++11 support. Minimum requires versions are GCC 5.1 / Clang 3.5 / Visual Studio 2013.
3131

32-
To build the GUI, you need Qt.
32+
To build the GUI application, you need to use the qmake (deprecated) or CMake build system.
3333

3434
When building the command line tool, [PCRE](http://www.pcre.org/) is optional. It is used if you build with rules.
3535

3636
There are multiple compilation choices:
37-
* qmake - cross platform build tool
38-
* cmake - cross platform build tool
39-
* Windows: Visual Studio (VS 2013 and above)
40-
* Windows: Qt Creator + mingw
37+
* qmake - cross platform build tool (deprecated)
38+
* CMake - cross platform build tool
39+
* Windows: Visual Studio
40+
* Windows: Qt Creator + MinGW
4141
* gnu make
42-
* g++ 4.8 (or later)
43-
* clang++
42+
* GCC (g++)
43+
* Clang (clang++)
4444

45-
### cmake
45+
### CMake
4646

4747
Example, compiling Cppcheck with cmake:
4848

releasenotes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ Other:
2828
- You can suppress warnings in a block of code using "-begin" and "-end".
2929
- You can suppress warnings in current file using "-file".
3030
- You can suppress all warnings where macro is used using "-macro"
31+
- The minimum required compiler versions have been bumped to GCC 5.1 / Clang 3.5

0 commit comments

Comments
 (0)