From eeda29dc59c32ca2bcf269eb8277ab05cf4f9923 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Mon, 27 Apr 2026 23:05:53 +0300 Subject: [PATCH 01/19] Add initial CppCoreGuidelines flags --- traincascade/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/traincascade/CMakeLists.txt b/traincascade/CMakeLists.txt index 3f801a5..d0c5107 100644 --- a/traincascade/CMakeLists.txt +++ b/traincascade/CMakeLists.txt @@ -93,6 +93,18 @@ target_compile_options( PRIVATE $<$:/W4 /WX> $<$>:-Wall -Wextra -Wpedantic -Werror> + # $<$>:-Wold-style-cast -Wcast-qual -Wcast-align=strict> + # $<$>:-Wconversion -Wsign-conversion -Warith-conversion> + $<$>:-Wshadow -Wnull-dereference -Wmisleading-indentation> + $<$>:-Wduplicated-cond -Wduplicated-branches -Wlogical-op> + $<$>:-Wimplicit-fallthrough -Wswitch-enum> + $<$>:-Wshift-overflow=2 -Wshift-negative-value> + $<$>:-Wformat=2 -Wformat-security> + $<$>:-Wstrict-aliasing=3 -fstrict-aliasing> + $<$>:-Wstack-protector -fstack-protector-strong> + $<$>:-Wnon-virtual-dtor -Woverloaded-virtual> + $<$>:-Wuninitialized -Wmaybe-uninitialized> + $<$>:-Walloca -Wvla> ) target_include_directories( From 2367fdcb19b0e14c64158a277d2d013aaa643671 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Mon, 27 Apr 2026 23:20:08 +0300 Subject: [PATCH 02/19] Fix clang flags --- traincascade/CMakeLists.txt | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/traincascade/CMakeLists.txt b/traincascade/CMakeLists.txt index d0c5107..4296895 100644 --- a/traincascade/CMakeLists.txt +++ b/traincascade/CMakeLists.txt @@ -92,18 +92,30 @@ target_compile_options( ${PROJECT_NAME} PRIVATE $<$:/W4 /WX> + # $<$:/Zc:__cplusplus /Zc:preprocessor /Zc:inline> + # $<$:/w14191 /w14242 /w14254 /w14263 /w14265 /w14266 /w14287> + # $<$:/w14289 /w14296 /w14311 /w14545 /w14546 /w14547 /w14549> + # $<$:/w14555 /w14619 /w14640 /w14826 /w14905 /w14906 /w14928> + # $<$:/w14365 /w14062 /w14061 /w15262 /w14463 /w14146> + # $<$:/w14456 /w14457 /w14458 /w14459> + # $<$:/w14700 /w14701 /w14703 /w14774 /w14777> $<$>:-Wall -Wextra -Wpedantic -Werror> # $<$>:-Wold-style-cast -Wcast-qual -Wcast-align=strict> # $<$>:-Wconversion -Wsign-conversion -Warith-conversion> $<$>:-Wshadow -Wnull-dereference -Wmisleading-indentation> - $<$>:-Wduplicated-cond -Wduplicated-branches -Wlogical-op> + # $<$>:-Wduplicated-branches> + # $<$>:-Wduplicated-cond> + # $<$>:-Wlogical-op> $<$>:-Wimplicit-fallthrough -Wswitch-enum> - $<$>:-Wshift-overflow=2 -Wshift-negative-value> + # $<$>:-Wshift-overflow=2> + $<$>:-Wshift-negative-value> $<$>:-Wformat=2 -Wformat-security> - $<$>:-Wstrict-aliasing=3 -fstrict-aliasing> + # $<$>:-Wstrict-aliasing=3> + $<$>:-fstrict-aliasing> $<$>:-Wstack-protector -fstack-protector-strong> $<$>:-Wnon-virtual-dtor -Woverloaded-virtual> - $<$>:-Wuninitialized -Wmaybe-uninitialized> + # $<$>:-Wuninitialized> + $<$>:-Wmaybe-uninitialized> $<$>:-Walloca -Wvla> ) From 7f8acfbfdce3c80c5d306a1f50acaa4c2d6756fc Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Mon, 27 Apr 2026 23:30:05 +0300 Subject: [PATCH 03/19] Fix local GCC build --- traincascade/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/traincascade/CMakeLists.txt b/traincascade/CMakeLists.txt index 4296895..c0959a8 100644 --- a/traincascade/CMakeLists.txt +++ b/traincascade/CMakeLists.txt @@ -100,8 +100,11 @@ target_compile_options( # $<$:/w14456 /w14457 /w14458 /w14459> # $<$:/w14700 /w14701 /w14703 /w14774 /w14777> $<$>:-Wall -Wextra -Wpedantic -Werror> - # $<$>:-Wold-style-cast -Wcast-qual -Wcast-align=strict> - # $<$>:-Wconversion -Wsign-conversion -Warith-conversion> + # $<$>:-Wold-style-cast> + $<$>:-Wcast-qual -Wcast-align=strict> + # $<$>:-Wsign-conversion> + # $<$>:-Wconversion> + $<$>:-Warith-conversion> $<$>:-Wshadow -Wnull-dereference -Wmisleading-indentation> # $<$>:-Wduplicated-branches> # $<$>:-Wduplicated-cond> @@ -115,7 +118,7 @@ target_compile_options( $<$>:-Wstack-protector -fstack-protector-strong> $<$>:-Wnon-virtual-dtor -Woverloaded-virtual> # $<$>:-Wuninitialized> - $<$>:-Wmaybe-uninitialized> + # $<$>:-Wmaybe-uninitialized> $<$>:-Walloca -Wvla> ) From 5f4f0d3b26631d30bb921d1754727246fff736cb Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Mon, 27 Apr 2026 23:36:26 +0300 Subject: [PATCH 04/19] Fix clang flags --- traincascade/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/traincascade/CMakeLists.txt b/traincascade/CMakeLists.txt index c0959a8..1acfa45 100644 --- a/traincascade/CMakeLists.txt +++ b/traincascade/CMakeLists.txt @@ -101,10 +101,11 @@ target_compile_options( # $<$:/w14700 /w14701 /w14703 /w14774 /w14777> $<$>:-Wall -Wextra -Wpedantic -Werror> # $<$>:-Wold-style-cast> - $<$>:-Wcast-qual -Wcast-align=strict> + $<$>:-Wcast-qual> + # $<$>:-Wcast-align=strict> # Clang # $<$>:-Wsign-conversion> # $<$>:-Wconversion> - $<$>:-Warith-conversion> + # $<$>:-Warith-conversion> # Clang $<$>:-Wshadow -Wnull-dereference -Wmisleading-indentation> # $<$>:-Wduplicated-branches> # $<$>:-Wduplicated-cond> From 303940497c4089eea7d6cb731452cc4860f6f021 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Mon, 27 Apr 2026 23:54:55 +0300 Subject: [PATCH 05/19] Update flag notes --- traincascade/CMakeLists.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/traincascade/CMakeLists.txt b/traincascade/CMakeLists.txt index 1acfa45..5db65a7 100644 --- a/traincascade/CMakeLists.txt +++ b/traincascade/CMakeLists.txt @@ -100,26 +100,26 @@ target_compile_options( # $<$:/w14456 /w14457 /w14458 /w14459> # $<$:/w14700 /w14701 /w14703 /w14774 /w14777> $<$>:-Wall -Wextra -Wpedantic -Werror> - # $<$>:-Wold-style-cast> + # $<$>:-Wold-style-cast> # Fix in code $<$>:-Wcast-qual> # $<$>:-Wcast-align=strict> # Clang - # $<$>:-Wsign-conversion> - # $<$>:-Wconversion> + # $<$>:-Wsign-conversion> # Fix in code + # $<$>:-Wconversion> # Fix in code # $<$>:-Warith-conversion> # Clang $<$>:-Wshadow -Wnull-dereference -Wmisleading-indentation> - # $<$>:-Wduplicated-branches> - # $<$>:-Wduplicated-cond> - # $<$>:-Wlogical-op> + # $<$>:-Wduplicated-branches> # Clang + # $<$>:-Wduplicated-cond> # Clang + # $<$>:-Wlogical-op> # Clang $<$>:-Wimplicit-fallthrough -Wswitch-enum> - # $<$>:-Wshift-overflow=2> + # $<$>:-Wshift-overflow=2> # Clang $<$>:-Wshift-negative-value> $<$>:-Wformat=2 -Wformat-security> - # $<$>:-Wstrict-aliasing=3> + # $<$>:-Wstrict-aliasing=3> # Clang $<$>:-fstrict-aliasing> $<$>:-Wstack-protector -fstack-protector-strong> $<$>:-Wnon-virtual-dtor -Woverloaded-virtual> - # $<$>:-Wuninitialized> - # $<$>:-Wmaybe-uninitialized> + $<$>:-Wuninitialized> + # $<$>:-Wmaybe-uninitialized> # Clang $<$>:-Walloca -Wvla> ) From 226e186e1a92e97af2abd863fca10249d935bf64 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 00:02:31 +0300 Subject: [PATCH 06/19] Test MSVC flags --- traincascade/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/traincascade/CMakeLists.txt b/traincascade/CMakeLists.txt index 5db65a7..86ec300 100644 --- a/traincascade/CMakeLists.txt +++ b/traincascade/CMakeLists.txt @@ -92,13 +92,13 @@ target_compile_options( ${PROJECT_NAME} PRIVATE $<$:/W4 /WX> - # $<$:/Zc:__cplusplus /Zc:preprocessor /Zc:inline> - # $<$:/w14191 /w14242 /w14254 /w14263 /w14265 /w14266 /w14287> - # $<$:/w14289 /w14296 /w14311 /w14545 /w14546 /w14547 /w14549> - # $<$:/w14555 /w14619 /w14640 /w14826 /w14905 /w14906 /w14928> - # $<$:/w14365 /w14062 /w14061 /w15262 /w14463 /w14146> - # $<$:/w14456 /w14457 /w14458 /w14459> - # $<$:/w14700 /w14701 /w14703 /w14774 /w14777> + $<$:/Zc:__cplusplus /Zc:preprocessor /Zc:inline> + $<$:/w14191 /w14242 /w14254 /w14263 /w14265 /w14266 /w14287> + $<$:/w14289 /w14296 /w14311 /w14545 /w14546 /w14547 /w14549> + $<$:/w14555 /w14619 /w14640 /w14826 /w14905 /w14906 /w14928> + $<$:/w14365 /w14062 /w14061 /w15262 /w14463 /w14146> + $<$:/w14456 /w14457 /w14458 /w14459> + $<$:/w14700 /w14701 /w14703 /w14774 /w14777> $<$>:-Wall -Wextra -Wpedantic -Werror> # $<$>:-Wold-style-cast> # Fix in code $<$>:-Wcast-qual> From a0316b4b3fadfc56719f363881ccf57374b1da98 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 08:16:33 +0300 Subject: [PATCH 07/19] Fix MSVC build --- traincascade/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/traincascade/CMakeLists.txt b/traincascade/CMakeLists.txt index 86ec300..b8f95a2 100644 --- a/traincascade/CMakeLists.txt +++ b/traincascade/CMakeLists.txt @@ -96,7 +96,8 @@ target_compile_options( $<$:/w14191 /w14242 /w14254 /w14263 /w14265 /w14266 /w14287> $<$:/w14289 /w14296 /w14311 /w14545 /w14546 /w14547 /w14549> $<$:/w14555 /w14619 /w14640 /w14826 /w14905 /w14906 /w14928> - $<$:/w14365 /w14062 /w14061 /w15262 /w14463 /w14146> + # $<$:/w14365> # Fix in code + $<$:/w14062 /w14061 /w15262 /w14463 /w14146> $<$:/w14456 /w14457 /w14458 /w14459> $<$:/w14700 /w14701 /w14703 /w14774 /w14777> $<$>:-Wall -Wextra -Wpedantic -Werror> From 84fb3959878bd2633330b21c5ecd112dee296707 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 08:17:15 +0300 Subject: [PATCH 08/19] Update OpenCV version --- external/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index ffe0e25..2e341e9 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -8,7 +8,7 @@ set(EXTERNAL_INSTALL_LOCATION ${CMAKE_BINARY_DIR}/external) ExternalProject_Add(opencv GIT_REPOSITORY https://github.com/opencv/opencv.git - GIT_TAG 4.5.0 + GIT_TAG 4.6.0 INSTALL_DIR ${EXTERNAL_INSTALL_LOCATION} CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION} From 1af4d6733b6b543d438c83f2098308918f45ca1b Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 08:26:33 +0300 Subject: [PATCH 09/19] Disable Java build --- external/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 2e341e9..2efad9d 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -22,4 +22,5 @@ ExternalProject_Add(opencv -DBUILD_opencv_python3=OFF -DBUILD_PROTOBUF=OFF -DBUILD_opencv_dnn=OFF + -DBUILD_JAVA=OFF ) From 2b6be59323d8160098077bbaf2afdbd4212f15f8 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 08:32:30 +0300 Subject: [PATCH 10/19] Fix macOS build --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d916fd9..f15c0a8 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -29,7 +29,7 @@ jobs: - name: Configure External CMake shell: bash working-directory: ${{github.workspace}}/build/external - run: cmake ../../external -DCMAKE_BUILD_TYPE=$BUILD_TYPE + run: cmake ../../external -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - name: Build External working-directory: ${{github.workspace}}/build/external From 60667930bff152f52058c540f193dc64bf90def0 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 08:43:11 +0300 Subject: [PATCH 11/19] Fix extrernal build cmake --- external/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 2efad9d..fd64a35 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -12,6 +12,7 @@ ExternalProject_Add(opencv INSTALL_DIR ${EXTERNAL_INSTALL_LOCATION} CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION} + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PERF_TESTS=OFF From 3092edb85551836d591fd899092856f5b8f2fded Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 08:43:55 +0300 Subject: [PATCH 12/19] Revert "Fix macOS build" This reverts commit 2b6be59323d8160098077bbaf2afdbd4212f15f8. --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f15c0a8..d916fd9 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -29,7 +29,7 @@ jobs: - name: Configure External CMake shell: bash working-directory: ${{github.workspace}}/build/external - run: cmake ../../external -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + run: cmake ../../external -DCMAKE_BUILD_TYPE=$BUILD_TYPE - name: Build External working-directory: ${{github.workspace}}/build/external From 611e1e90adb90374fc49581170eb8396abc5f1da Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 08:50:29 +0300 Subject: [PATCH 13/19] Fix zlib build --- external/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index fd64a35..a72ed09 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -13,6 +13,7 @@ ExternalProject_Add(opencv CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION} -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DBUILD_ZLIB=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PERF_TESTS=OFF From d6355e70d0e2757c1c6bfc6ed6b93bd40a02a6c6 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 08:57:58 +0300 Subject: [PATCH 14/19] Fix macOS vednored libs build --- external/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index a72ed09..cae9ef1 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -14,6 +14,11 @@ ExternalProject_Add(opencv -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION} -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DBUILD_ZLIB=OFF + -DBUILD_PNG=OFF + -DBUILD_JPEG=OFF + -DBUILD_TIFF=OFF + -DBUILD_WEBP=OFF + -DBUILD_OPENJPEG=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PERF_TESTS=OFF From 4048679c4655add5a73bf5eb1d3635e81108ecc8 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 09:23:22 +0300 Subject: [PATCH 15/19] Update github actions versions --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/static_check.yml | 4 ++-- .github/workflows/ubuntu.yml | 2 +- .github/workflows/windows.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0b45fa8..a0157cb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d916fd9..c917666 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,7 +18,7 @@ jobs: runs-on: macOS-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Create Build Environment run: cmake -E make_directory ${{github.workspace}}/build diff --git a/.github/workflows/static_check.yml b/.github/workflows/static_check.yml index 7c79f7f..bf60752 100644 --- a/.github/workflows/static_check.yml +++ b/.github/workflows/static_check.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install OpenCV run: | @@ -58,7 +58,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download Compile Commands uses: actions/download-artifact@v4 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index ee7dbc8..d8b66ad 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install OpenCV run: | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index bfdc1db..333fd14 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,7 +18,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Create Build Environment run: cmake -E make_directory ${{github.workspace}}/build From 4acdfdb0a79d5bc2b5b65c1f68c1937c443590f3 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 09:44:18 +0300 Subject: [PATCH 16/19] Update additional github actions --- .github/workflows/codeql-analysis.yml | 6 +++--- .github/workflows/macos.yml | 2 +- .github/workflows/static_check.yml | 12 ++++++------ .github/workflows/ubuntu.yml | 2 +- .github/workflows/windows.yml | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a0157cb..f869140 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -41,11 +41,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -81,4 +81,4 @@ jobs: run: cmake --build . --config $BUILD_TYPE - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index c917666..e323ccb 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,7 +18,7 @@ jobs: runs-on: macOS-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Create Build Environment run: cmake -E make_directory ${{github.workspace}}/build diff --git a/.github/workflows/static_check.yml b/.github/workflows/static_check.yml index bf60752..121b9c4 100644 --- a/.github/workflows/static_check.yml +++ b/.github/workflows/static_check.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install OpenCV run: | @@ -27,7 +27,7 @@ jobs: run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - name: Upload Compile Commands - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: compile_commands path: ${{github.workspace}}/build/compile_commands.json @@ -46,7 +46,7 @@ jobs: -export-fixes ${{github.workspace}}/clang-tidy-fixes.yaml - name: Upload Clang Tidy Result - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: clang_tidy_fixes path: ${{github.workspace}}/clang-tidy-fixes.yaml @@ -58,10 +58,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Download Compile Commands - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: compile_commands @@ -78,7 +78,7 @@ jobs: --output-file=${{github.workspace}}/cppcheck-report.txt . - name: Upload CppCheck Result - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: cppcheck_report path: ${{github.workspace}}/cppcheck-report.txt diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index d8b66ad..4640f17 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install OpenCV run: | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 333fd14..06d2c38 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,7 +18,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Create Build Environment run: cmake -E make_directory ${{github.workspace}}/build From c2f9f5a3df7f854f43460414f4d62e4a22adeb78 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 20:06:29 +0300 Subject: [PATCH 17/19] Separate Glang and GNU flags --- traincascade/CMakeLists.txt | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/traincascade/CMakeLists.txt b/traincascade/CMakeLists.txt index b8f95a2..6c6c5db 100644 --- a/traincascade/CMakeLists.txt +++ b/traincascade/CMakeLists.txt @@ -103,25 +103,29 @@ target_compile_options( $<$>:-Wall -Wextra -Wpedantic -Werror> # $<$>:-Wold-style-cast> # Fix in code $<$>:-Wcast-qual> - # $<$>:-Wcast-align=strict> # Clang # $<$>:-Wsign-conversion> # Fix in code # $<$>:-Wconversion> # Fix in code - # $<$>:-Warith-conversion> # Clang $<$>:-Wshadow -Wnull-dereference -Wmisleading-indentation> - # $<$>:-Wduplicated-branches> # Clang - # $<$>:-Wduplicated-cond> # Clang - # $<$>:-Wlogical-op> # Clang $<$>:-Wimplicit-fallthrough -Wswitch-enum> - # $<$>:-Wshift-overflow=2> # Clang $<$>:-Wshift-negative-value> $<$>:-Wformat=2 -Wformat-security> - # $<$>:-Wstrict-aliasing=3> # Clang $<$>:-fstrict-aliasing> $<$>:-Wstack-protector -fstack-protector-strong> $<$>:-Wnon-virtual-dtor -Woverloaded-virtual> $<$>:-Wuninitialized> - # $<$>:-Wmaybe-uninitialized> # Clang $<$>:-Walloca -Wvla> + $<$:-Wcast-align=strict> + $<$:-Warith-conversion> + $<$:-Wduplicated-branches> + $<$:-Wduplicated-cond> + $<$:-Wlogical-op> + $<$:-Wshift-overflow=2> + $<$:-Wstrict-aliasing=3> + $<$:-Wmaybe-uninitialized> + $<$:-Wcast-align> + $<$:-Wlogical-op-parentheses> + $<$:-Wshift-overflow> + $<$:-Wconditional-uninitialized -Wsometimes-uninitialized> ) target_include_directories( From 2105b92bce250724f84f1fef1b59dd5c02bc5634 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 20:34:43 +0300 Subject: [PATCH 18/19] Fix clang-tidy setup --- .github/workflows/static_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static_check.yml b/.github/workflows/static_check.yml index 121b9c4..08cfcdb 100644 --- a/.github/workflows/static_check.yml +++ b/.github/workflows/static_check.yml @@ -24,7 +24,7 @@ jobs: - name: Configure CMake shell: bash working-directory: ${{github.workspace}}/build - run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + run: cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - name: Upload Compile Commands uses: actions/upload-artifact@v7 From de06dfb49503c8a34c7765317c2fd58055758242 Mon Sep 17 00:00:00 2001 From: Vladislav Antonov Date: Tue, 28 Apr 2026 20:42:09 +0300 Subject: [PATCH 19/19] Add flags to tests --- traincascade/CMakeLists.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/traincascade/CMakeLists.txt b/traincascade/CMakeLists.txt index 6c6c5db..479514a 100644 --- a/traincascade/CMakeLists.txt +++ b/traincascade/CMakeLists.txt @@ -160,7 +160,40 @@ target_compile_options( test_traincascade PRIVATE $<$:/W4 /WX> + $<$:/Zc:__cplusplus /Zc:preprocessor /Zc:inline> + $<$:/w14191 /w14242 /w14254 /w14263 /w14265 /w14266 /w14287> + $<$:/w14289 /w14296 /w14311 /w14545 /w14546 /w14547 /w14549> + $<$:/w14555 /w14619 /w14640 /w14826 /w14905 /w14906 /w14928> + $<$:/w14365> + $<$:/w14062 /w14061 /w15262 /w14463 /w14146> + $<$:/w14456 /w14457 /w14458 /w14459> + $<$:/w14700 /w14701 /w14703 /w14774 /w14777> $<$>:-Wall -Wextra -Wpedantic -Werror> + $<$>:-Wold-style-cast> + $<$>:-Wcast-qual> + $<$>:-Wsign-conversion> + $<$>:-Wconversion> + $<$>:-Wshadow -Wnull-dereference -Wmisleading-indentation> + $<$>:-Wimplicit-fallthrough -Wswitch-enum> + $<$>:-Wshift-negative-value> + $<$>:-Wformat=2 -Wformat-security> + $<$>:-fstrict-aliasing> + $<$>:-Wstack-protector -fstack-protector-strong> + $<$>:-Wnon-virtual-dtor -Woverloaded-virtual> + $<$>:-Wuninitialized> + $<$>:-Walloca -Wvla> + $<$:-Wcast-align=strict> + $<$:-Warith-conversion> + $<$:-Wduplicated-branches> + $<$:-Wduplicated-cond> + $<$:-Wlogical-op> + $<$:-Wshift-overflow=2> + $<$:-Wstrict-aliasing=3> + $<$:-Wmaybe-uninitialized> + $<$:-Wcast-align> + $<$:-Wlogical-op-parentheses> + $<$:-Wshift-overflow> + $<$:-Wconditional-uninitialized -Wsometimes-uninitialized> ) target_include_directories(