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
36 changes: 36 additions & 0 deletions .github/workflows/CI-unixish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,42 @@ jobs:
run: |
cmake --build cmake.output.boost -- -j$(nproc)
build_cmake_minimum: # TODO: move to docker workflow?

runs-on: ubuntu-22.04 # use the oldest available runner

env:
CMAKE_VERSION: 3.22
CMAKE_VERSION_FULL: 3.22.6

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install missing software
run: |
sudo apt-get update
sudo apt-get install libxml2-utils
# qt6-tools-dev-tools for lprodump
# qt6-l10n-tools for lupdate
sudo apt-get install qt6-base-dev libqt6charts6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libglx-dev libgl1-mesa-dev
- name: Install CMake
run: |
wget https://cmake.org/files/v${{ env.CMAKE_VERSION }}/cmake-${{ env.CMAKE_VERSION_FULL }}-linux-x86_64.tar.gz
tar xf cmake-${{ env.CMAKE_VERSION_FULL }}-linux-x86_64.tar.gz
- name: Run CMake (without GUI)
run: |
export PATH=cmake-${{ env.CMAKE_VERSION_FULL }}-linux-x86_64/bin:$PATH
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTING=On
- name: Run CMake (with GUI)
run: |
export PATH=cmake-${{ env.CMAKE_VERSION_FULL }}-linux-x86_64/bin:$PATH
cmake -S . -B cmake.output.gui -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On
build:

strategy:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/CI-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,48 @@ jobs:
run: |
cmake --build build.cxxstd --config Debug || exit /b !errorlevel!

build_cmake_minimum:

runs-on: windows-2022 # use the oldest available runner

env:
CMAKE_VERSION: 3.22
CMAKE_VERSION_FULL: 3.22.6

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install CMake
run: |
curl -fsSL https://cmake.org/files/v${{ env.CMAKE_VERSION }}/cmake-${{ env.CMAKE_VERSION_FULL }}-windows-x86_64.zip -o cmake.zip || exit /b !errorlevel!
7z x cmake.zip || exit /b !errorlevel!

- name: Set up Visual Studio environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.10.0
modules: 'qtcharts'
setup-python: 'false'
cache: true
aqtversion: '==3.1.*' # TODO: remove when aqtinstall 3.2.2 is available

- name: Run CMake (without GUI)
run: |
:: TODO: enable DHAVE_RULES?
cmake-${{ env.CMAKE_VERSION_FULL }}-windows-x86_64\bin\cmake.exe -S . -B cmake.output -G "Visual Studio 17 2022" -A x64 -DHAVE_RULES=Off -DBUILD_TESTING=On

- name: Run CMake (with GUI)
run: |
:: TODO: enable DHAVE_RULES?
cmake-${{ env.CMAKE_VERSION_FULL }}-windows-x86_64\bin\cmake.exe -S . -B cmake.output.gui -G "Visual Studio 17 2022" -A x64 -DHAVE_RULES=Off -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On

build:
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.22)
project(Cppcheck VERSION 2.18.99 LANGUAGES CXX)

include(cmake/options.cmake)
Expand Down
12 changes: 4 additions & 8 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,10 @@ option(ENABLE_CSA_ALPHA "Enable Clang Static Analyzer alpha checkers for run
# TODO: disable by default like make build?
option(FILESDIR "Hard-coded directory for files to load from" OFF)

if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16")
set(CMAKE_DISABLE_PRECOMPILE_HEADERS Off CACHE BOOL "Disable precompiled headers")
# need to disable the prologue or it will be treated like a system header and not emit any warnings
# see https://gitlab.kitware.com/cmake/cmake/-/issues/21219
set(CMAKE_PCH_PROLOGUE "")
else()
set(CMAKE_DISABLE_PRECOMPILE_HEADERS On CACHE BOOL "Disable precompiled headers")
endif()
set(CMAKE_DISABLE_PRECOMPILE_HEADERS Off CACHE BOOL "Disable precompiled headers")
# need to disable the prologue or it will be treated like a system header and not emit any warnings
# see https://gitlab.kitware.com/cmake/cmake/-/issues/21219
set(CMAKE_PCH_PROLOGUE "")

set(CMAKE_INCLUDE_DIRS_CONFIGCMAKE ${CMAKE_INSTALL_PREFIX}/include CACHE PATH "Output directory for headers")
set(CMAKE_LIB_DIRS_CONFIGCMAKE ${CMAKE_INSTALL_PREFIX}/lib CACHE PATH "Output directory for libraries")
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The minimum required Python version is 3.7.

### CMake

The minimum required version is CMake 3.13.
The minimum required version is CMake 3.22.

Example, compiling Cppcheck with cmake:

Expand Down
1 change: 1 addition & 0 deletions releasenotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ Infrastructure & dependencies:

Other:
- The built-in "win*" and "unix*" platforms will now default to signed char type instead of unknown signedness. If you require unsigned chars please specify "--funsigned-char"
- bumped minimum required CMake version to 3.22
-
Loading