@@ -144,16 +144,18 @@ jobs:
144144 # pcre was removed from runner images in November 2022
145145 brew install coreutils qt@6 pcre
146146
147- - name : CMake build on ubuntu (with GUI)
147+ - name : Run CMake on ubuntu (with GUI)
148148 if : contains(matrix.os, 'ubuntu')
149149 run : |
150- cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=${{ matrix.use_qt6 }} -DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
151- cmake --build cmake.output -- -j$(nproc)
150+ cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=${{ matrix.use_qt6 }} -DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install
152151
153- - name : CMake build on macos (with GUI)
152+ - name : Run CMake on macos (with GUI)
154153 if : contains(matrix.os, 'macos')
155154 run : |
156- cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
155+ cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
156+
157+ - name : Run CMake build
158+ run : |
157159 cmake --build cmake.output -- -j$(nproc)
158160
159161 - name : Run CMake test
@@ -165,6 +167,10 @@ jobs:
165167 pushd cmake.output
166168 ctest --output-on-failure -j$(nproc)
167169
170+ - name : Run CMake install
171+ run : |
172+ cmake --build cmake.output --target install
173+
168174 build_uchar :
169175
170176 strategy :
@@ -382,6 +388,11 @@ jobs:
382388 run : |
383389 make -j$(nproc) checkCWEEntries validateXML
384390
391+ - name : Test install
392+ run : |
393+ # this is only to test the "install" target - since we did not build with FILESDIR it would not work as intended
394+ make DESTDIR=cppcheck-make-install FILESDIR=/share/Cppcheck install
395+
385396 - name : Test Signalhandler
386397 run : |
387398 cmake -S . -B cmake.output.signal -G "Unix Makefiles" -DBUILD_TESTS=On
0 commit comments