Skip to content

Commit

Permalink
fixed #13132 - removed deprecated support for qmake [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Oct 16, 2024
1 parent 66d53a2 commit a77b22d
Show file tree
Hide file tree
Showing 30 changed files with 13 additions and 988 deletions.
88 changes: 0 additions & 88 deletions .github/workflows/CI-unixish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,94 +247,6 @@ jobs:
run: |
ls lib/*.cpp | xargs -n 1 -P $(nproc) g++ -fsyntax-only -std=c++0x -Ilib -Iexternals -Iexternals/picojson -Iexternals/simplecpp -Iexternals/tinyxml2 -DNONNEG
build_qmake:

strategy:
matrix:
# no longer build with qmake on MacOS as brew might lack pre-built Qt5 packages causing the step to run for hours
os: [ubuntu-20.04, ubuntu-22.04]
fail-fast: false # Prefer quick result

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Install missing software on ubuntu
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser
# coreutils contains "nproc"
- name: Install missing software on macos
if: contains(matrix.os, 'macos')
run: |
brew install coreutils qt@5
# expose qmake
brew link qt@5 --force
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}

- name: Build GUI
run: |
export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
pushd gui
qmake CONFIG+=debug CONFIG+=ccache HAVE_QCHART=yes
make -j$(nproc)
# TODO: binaries are in a different location on macos
- name: Build and Run GUI tests
if: contains(matrix.os, 'ubuntu')
run: |
export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
pushd gui/test/cppchecklibrarydata
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
./test-cppchecklibrarydata
popd
pushd gui/test/filelist
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
./test-filelist
popd
pushd gui/test/projectfile
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
./test-projectfile
popd
pushd gui/test/resultstree
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
export QT_QPA_PLATFORM=offscreen
./test-resultstree
popd
pushd gui/test/translationhandler
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
# TODO: requires X session because of QApplication dependency in translationhandler.cpp
#./test-translationhandler
popd
pushd gui/test/xmlreportv2
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
./test-xmlreportv2
- name: Generate Qt help file
run: |
pushd gui/help
qhelpgenerator online-help.qhcp -o online-help.qhc
- name: Build triage
run: |
export PATH="$(brew --prefix)/opt/ccache/libexec:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
pushd tools/triage
qmake CONFIG+=debug CONFIG+=ccache
make -j$(nproc)
build:

strategy:
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/CI-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,15 @@ jobs:
modules: 'qtcharts'
cache: true

- name: Build GUI release (qmake)
- name: Build GUI release (Qt 5)
if: startsWith(matrix.qt_ver, '5')
run: |
cd gui || exit /b !errorlevel!
qmake HAVE_QCHART=yes || exit /b !errorlevel!
nmake release || exit /b !errorlevel!
env:
CL: /MP

- name: Deploy GUI
if: startsWith(matrix.qt_ver, '5')
run: |
windeployqt Build\gui || exit /b !errorlevel!
del Build\gui\cppcheck-gui.ilk || exit /b !errorlevel!
del Build\gui\cppcheck-gui.pdb || exit /b !errorlevel!
; TODO: enable rules?
; specify Release build so matchcompiler is used
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
- name: Build GUI release (CMake)
- name: Build GUI release (Qt 6)
if: startsWith(matrix.qt_ver, '6')
run: |
; TODO: enable rules?
Expand All @@ -72,7 +64,6 @@ jobs:
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
- name: Deploy GUI
if: startsWith(matrix.qt_ver, '6')
run: |
windeployqt build\bin\Release || exit /b !errorlevel!
del build\bin\Release\cppcheck-gui.ilk || exit /b !errorlevel!
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/iwyu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ jobs:
run: |
zypper install -y cmake clang pcre-devel
zypper install -y include-what-you-use-tools
# fixes error during Qt installation
# /__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
zypper install -y libgthread-2_0-0
ln -s iwyu_tool.py /usr/bin/iwyu_tool
# Fails on OpenSUSE:
Expand Down
31 changes: 0 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,42 +50,14 @@ ipch/
*.pbxuser
build/

# GUI build folders
/gui/debug/
/gui/release/
/gui/temp/
/triage/temp

# Other (generated) GUI files
/gui/*.qm
/gui/cppcheck-gui
/gui/cppcheck-gui.exe
/gui/gui.sln
/gui/gui.vcproj
/gui/help/online-help.qch
/gui/help/online-help.qhc
/gui/Makefile
/gui/Makefile.debug
/gui/Makefile.release
/gui/qrc_gui.cpp
/gui/test/Makefile
/gui/test/*/Makefile
/gui/test/*/*/Makefile
/gui/test/benchmark/simple/benchmark-simple
/gui/test/cppchecklibrarydata/qrc_resources.cpp
/gui/test/cppchecklibrarydata/test-cppchecklibrarydata
/gui/test/filelist/test-filelist
/gui/test/projectfile/test-projectfile
/gui/test/translationhandler/test-translationhandler
/gui/test/xmlreportv2/test-xmlreportv2

# Doxygen output folder
doxyoutput/

# qmake generated
htmlreport/.tox/
htmlreport/MANIFEST

# Backup files and stuff from patches
*.rej
*~
Expand Down Expand Up @@ -124,9 +96,6 @@ stage
.cache/
compile_commands.json

# qmake
.qmake.stash

#vs code
/.vscode

Expand Down
13 changes: 0 additions & 13 deletions build-pcre.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@ PCRE is a library that is used by the optional "rules" feature for the command
line version of cppcheck. It is readily available on Linux and Mac OS X, but
must be obtained separately for Windows.

If you're using qmake to generate makefiles, the following behavior applies:

- If you're not on Windows, it assumes by default that you have PCRE and want
to enable rules support. You can disable rules support (removing the PCRE
dependency) by passing HAVE_RULES=no to qmake.

- If you are on Windows, but have PCRE available, you can enable rules support
by passing HAVE_RULES=yes to qmake.

- Note: This includes using build.bat since it calls qmake - to use PCRE and
build.bat, you need to run set HAVE_RULES=yes before each run of build.bat


Build instructions
------------------

Expand Down
23 changes: 0 additions & 23 deletions console_common.pri

This file was deleted.

11 changes: 0 additions & 11 deletions externals/externals.pri

This file was deleted.

Loading

0 comments on commit a77b22d

Please sign in to comment.