Skip to content

Commit b97ec89

Browse files
committed
fixed #13132 - removed deprecated support for qmake
1 parent 0794699 commit b97ec89

30 files changed

+18
-953
lines changed

.github/workflows/CI-unixish.yml

-88
Original file line numberDiff line numberDiff line change
@@ -247,94 +247,6 @@ jobs:
247247
run: |
248248
ls lib/*.cpp | xargs -n 1 -P $(nproc) g++ -fsyntax-only -std=c++0x -Ilib -Iexternals -Iexternals/picojson -Iexternals/simplecpp -Iexternals/tinyxml2 -DNONNEG
249249
250-
build_qmake:
251-
252-
strategy:
253-
matrix:
254-
# no longer build with qmake on MacOS as brew might lack pre-built Qt5 packages causing the step to run for hours
255-
os: [ubuntu-20.04, ubuntu-22.04]
256-
fail-fast: false # Prefer quick result
257-
258-
runs-on: ${{ matrix.os }}
259-
260-
steps:
261-
- uses: actions/checkout@v4
262-
263-
- name: Install missing software on ubuntu
264-
if: contains(matrix.os, 'ubuntu')
265-
run: |
266-
sudo apt-get update
267-
sudo apt-get install qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser
268-
269-
# coreutils contains "nproc"
270-
- name: Install missing software on macos
271-
if: contains(matrix.os, 'macos')
272-
run: |
273-
brew install coreutils qt@5
274-
# expose qmake
275-
brew link qt@5 --force
276-
277-
- name: ccache
278-
uses: hendrikmuhs/[email protected]
279-
with:
280-
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
281-
282-
- name: Build GUI
283-
run: |
284-
export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
285-
pushd gui
286-
qmake CONFIG+=debug CONFIG+=ccache HAVE_QCHART=yes
287-
make -j$(nproc)
288-
289-
# TODO: binaries are in a different location on macos
290-
- name: Build and Run GUI tests
291-
if: contains(matrix.os, 'ubuntu')
292-
run: |
293-
export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
294-
pushd gui/test/cppchecklibrarydata
295-
qmake CONFIG+=debug CONFIG+=ccache
296-
make -j$(nproc)
297-
./test-cppchecklibrarydata
298-
popd
299-
pushd gui/test/filelist
300-
qmake CONFIG+=debug CONFIG+=ccache
301-
make -j$(nproc)
302-
./test-filelist
303-
popd
304-
pushd gui/test/projectfile
305-
qmake CONFIG+=debug CONFIG+=ccache
306-
make -j$(nproc)
307-
./test-projectfile
308-
popd
309-
pushd gui/test/resultstree
310-
qmake CONFIG+=debug CONFIG+=ccache
311-
make -j$(nproc)
312-
export QT_QPA_PLATFORM=offscreen
313-
./test-resultstree
314-
popd
315-
pushd gui/test/translationhandler
316-
qmake CONFIG+=debug CONFIG+=ccache
317-
make -j$(nproc)
318-
# TODO: requires X session because of QApplication dependency in translationhandler.cpp
319-
#./test-translationhandler
320-
popd
321-
pushd gui/test/xmlreportv2
322-
qmake CONFIG+=debug CONFIG+=ccache
323-
make -j$(nproc)
324-
./test-xmlreportv2
325-
326-
- name: Generate Qt help file
327-
run: |
328-
pushd gui/help
329-
qhelpgenerator online-help.qhcp -o online-help.qhc
330-
331-
- name: Build triage
332-
run: |
333-
export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
334-
pushd tools/triage
335-
qmake CONFIG+=debug CONFIG+=ccache
336-
make -j$(nproc)
337-
338250
build:
339251

340252
strategy:

.github/workflows/CI-windows.yml

+6-15
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,15 @@ jobs:
4747
modules: 'qtcharts'
4848
cache: true
4949

50-
- name: Build GUI release (qmake)
50+
- name: Build GUI release (Qt 5)
5151
if: startsWith(matrix.qt_ver, '5')
5252
run: |
53-
cd gui || exit /b !errorlevel!
54-
qmake HAVE_QCHART=yes || exit /b !errorlevel!
55-
nmake release || exit /b !errorlevel!
56-
env:
57-
CL: /MP
58-
59-
- name: Deploy GUI
60-
if: startsWith(matrix.qt_ver, '5')
61-
run: |
62-
windeployqt Build\gui || exit /b !errorlevel!
63-
del Build\gui\cppcheck-gui.ilk || exit /b !errorlevel!
64-
del Build\gui\cppcheck-gui.pdb || exit /b !errorlevel!
53+
; TODO: enable rules?
54+
; specify Release build so matchcompiler is used
55+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
56+
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
6557
66-
- name: Build GUI release (CMake)
58+
- name: Build GUI release (Qt 6)
6759
if: startsWith(matrix.qt_ver, '6')
6860
run: |
6961
; TODO: enable rules?
@@ -72,7 +64,6 @@ jobs:
7264
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
7365
7466
- name: Deploy GUI
75-
if: startsWith(matrix.qt_ver, '6')
7667
run: |
7768
windeployqt build\bin\Release || exit /b !errorlevel!
7869
del build\bin\Release\cppcheck-gui.ilk || exit /b !errorlevel!

.github/workflows/iwyu.yml

-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ jobs:
7070
run: |
7171
zypper install -y cmake clang pcre-devel
7272
zypper install -y include-what-you-use-tools
73-
# fixes error during Qt installation
74-
# /__w/cppcheck/Qt/6.7.0/gcc_64/bin/qmake: error while loading shared libraries: libgthread-2.0.so.0: cannot open shared object file: No such file or directory
75-
zypper install -y libgthread-2_0-0
7673
ln -s iwyu_tool.py /usr/bin/iwyu_tool
7774
7875
# Fails on OpenSUSE:

.gitignore

-32
Original file line numberDiff line numberDiff line change
@@ -50,42 +50,13 @@ ipch/
5050
*.pbxuser
5151
build/
5252

53-
# GUI build folders
54-
/gui/debug/
55-
/gui/release/
56-
/gui/temp/
57-
/triage/temp
58-
5953
# Other (generated) GUI files
60-
/gui/*.qm
61-
/gui/cppcheck-gui
62-
/gui/cppcheck-gui.exe
63-
/gui/gui.sln
64-
/gui/gui.vcproj
6554
/gui/help/online-help.qch
6655
/gui/help/online-help.qhc
67-
/gui/Makefile
68-
/gui/Makefile.debug
69-
/gui/Makefile.release
70-
/gui/qrc_gui.cpp
71-
/gui/test/Makefile
72-
/gui/test/*/Makefile
73-
/gui/test/*/*/Makefile
74-
/gui/test/benchmark/simple/benchmark-simple
75-
/gui/test/cppchecklibrarydata/qrc_resources.cpp
76-
/gui/test/cppchecklibrarydata/test-cppchecklibrarydata
77-
/gui/test/filelist/test-filelist
78-
/gui/test/projectfile/test-projectfile
79-
/gui/test/translationhandler/test-translationhandler
80-
/gui/test/xmlreportv2/test-xmlreportv2
8156

8257
# Doxygen output folder
8358
doxyoutput/
8459

85-
# qmake generated
86-
htmlreport/.tox/
87-
htmlreport/MANIFEST
88-
8960
# Backup files and stuff from patches
9061
*.rej
9162
*~
@@ -124,9 +95,6 @@ stage
12495
.cache/
12596
compile_commands.json
12697

127-
# qmake
128-
.qmake.stash
129-
13098
#vs code
13199
/.vscode
132100

build-pcre.txt

-13
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,6 @@ PCRE is a library that is used by the optional "rules" feature for the command
22
line version of cppcheck. It is readily available on Linux and Mac OS X, but
33
must be obtained separately for Windows.
44

5-
If you're using qmake to generate makefiles, the following behavior applies:
6-
7-
- If you're not on Windows, it assumes by default that you have PCRE and want
8-
to enable rules support. You can disable rules support (removing the PCRE
9-
dependency) by passing HAVE_RULES=no to qmake.
10-
11-
- If you are on Windows, but have PCRE available, you can enable rules support
12-
by passing HAVE_RULES=yes to qmake.
13-
14-
- Note: This includes using build.bat since it calls qmake - to use PCRE and
15-
build.bat, you need to run set HAVE_RULES=yes before each run of build.bat
16-
17-
185
Build instructions
196
------------------
207

console_common.pri

-23
This file was deleted.

externals/externals.pri

-11
This file was deleted.

0 commit comments

Comments
 (0)