Skip to content

Commit

Permalink
fixed -Wmissing-include-dirs warning by running autogen before PCH …
Browse files Browse the repository at this point in the history
…generation in CI (#6813)

```
Building CXX object gui/CMakeFiles/cppcheck-gui.dir/cmake_pch.hxx.pch
clang++-19: warning: no such include directory: '/home/runner/work/cppcheck/cppcheck/cmake.output/gui/cppcheck-gui_autogen/include' [-Wmissing-include-dirs]
```
  • Loading branch information
firewave committed Sep 23, 2024
1 parent 6e53331 commit 38e8d39
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ jobs:
- name: Prepare CMake
run: |
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off WARNINGS_ARE_ERRORS=On
env:
CC: clang-19
CXX: clang++-19

- name: Prepare CMake dependencies
run: |
# make sure the auto-generated GUI sources exist
make -C cmake.output autogen
# make sure the precompiled headers exist
make -C cmake.output/cli cmake_pch.hxx.pch
make -C cmake.output/gui cmake_pch.hxx.pch
make -C cmake.output/lib cmake_pch.hxx.pch
make -C cmake.output/test cmake_pch.hxx.pch
# make sure the auto-generated GUI sources exist
make -C cmake.output autogen
- name: Clang-Tidy
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/iwyu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ jobs:
# /__w/cppcheck/Qt/6.7.0/gcc_64/libexec/rcc: error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file: No such file or directory
- name: Prepare CMake dependencies
run: |
# make sure the auto-generated GUI sources exist
make -C cmake.output autogen
# make sure the precompiled headers exist
#make -C cmake.output/cli cmake_pch.hxx.pch
#make -C cmake.output/gui cmake_pch.hxx.pch
#make -C cmake.output/lib cmake_pch.hxx.pch
#make -C cmake.output/test cmake_pch.hxx.pch
# make sure the auto-generated GUI sources exist
make -C cmake.output autogen
# make sure the auto-generated GUI dependencies exist
make -C cmake.output gui-build-deps
make -C cmake.output triage-build-ui-deps
Expand Down Expand Up @@ -167,13 +167,13 @@ jobs:

- name: Prepare CMake dependencies
run: |
# make sure the auto-generated GUI sources exist
make -C cmake.output autogen
# make sure the precompiled headers exist
#make -C cmake.output/cli cmake_pch.hxx.pch
#make -C cmake.output/gui cmake_pch.hxx.pch
#make -C cmake.output/lib cmake_pch.hxx.pch
#make -C cmake.output/test cmake_pch.hxx.pch
# make sure the auto-generated GUI sources exist
make -C cmake.output autogen
# make sure the auto-generated GUI dependencies exist
make -C cmake.output gui-build-deps
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/selfcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ jobs:
- name: Generate dependencies
run: |
# make sure auto-generated GUI files exist
make -C cmake.output autogen
# make sure the precompiled headers exist
make -C cmake.output lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx
make -C cmake.output test/CMakeFiles/testrunner.dir/cmake_pch.hxx.cxx
# make sure auto-generated GUI files exist
make -C cmake.output autogen
# make sure the auto-generated GUI dependencies exist
make -C cmake.output gui-build-deps
# TODO: find a way to report unmatched suppressions without need to add information checks
Expand All @@ -92,10 +93,11 @@ jobs:
- name: Generate dependencies (no test)
run: |
# make sure the precompiled headers exist
make -C cmake.output.notest lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx
# make sure auto-generated GUI files exist
make -C cmake.output.notest autogen
# make sure the precompiled headers exist
make -C cmake.output.notest lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx
# make sure the auto-generated GUI dependencies exist
make -C cmake.output.notest gui-build-deps
# TODO: find a way to report unmatched suppressions without need to add information checks
Expand Down Expand Up @@ -133,10 +135,11 @@ jobs:
- name: Generate dependencies (no test / no cli)
run: |
# make sure the precompiled headers exist
make -C cmake.output.notest_nocli lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx
# make sure auto-generated GUI files exist
make -C cmake.output.notest_nocli autogen
# make sure the precompiled headers exist
make -C cmake.output.notest_nocli lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx
# make sure the auto-generated GUI dependencies exist
make -C cmake.output.notest_nocli gui-build-deps
# TODO: find a way to report unmatched suppressions without need to add information checks
Expand All @@ -160,10 +163,11 @@ jobs:
- name: Generate dependencies (corpus)
run: |
# make sure the precompiled headers exist
make -C cmake.output.corpus lib/CMakeFiles/lib_objs.dir/cmake_pch.hxx.cxx
# make sure auto-generated GUI files exist
make -C cmake.output.corpus autogen
# make sure the precompiled headers exist
make -C cmake.output.corpus lib/CMakeFiles/lib_objs.dir/cmake_pch.hxx.cxx
# make sure the auto-generated GUI dependencies exist
make -C cmake.output.corpus gui-build-deps
# TODO: find a way to report unmatched suppressions without need to add information checks
Expand Down

0 comments on commit 38e8d39

Please sign in to comment.