From 0e8aa219b9fa978547c5700dc07a61b7b9791ef3 Mon Sep 17 00:00:00 2001 From: Bram Oosterhuis Date: Tue, 10 Mar 2026 14:36:14 +0100 Subject: [PATCH 1/3] cmake: Remove direct C/CXX flag manipulation Strict flags are now inherited via find_package(Thunder) when Thunder is built with ENABLE_STRICT_COMPILER_SETTINGS=ON, and can be opted out by setting ENABLE_STRICT_COMPILER_SETTINGS=OFF in a downstream project. --- CMakeLists.txt | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e79b5de1..a17c888d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,24 +52,6 @@ if (BUILD_REFERENCE) add_definitions (-DBUILD_REFERENCE=${BUILD_REFERENCE}) endif() -if(ENABLE_STRICT_COMPILER_SETTINGS) - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - message(FATAL_ERROR "Compiling with Clang") - set(CMAKE_STRICT_COMPILER_SETTINGS "-Weverything -Wextra -Wpedantic -Werror") - set(CMAKE_STRICT_CXX_COMPILER_SETTINGS "${CMAKE_STRICT_COMPILER_SETTINGS} -Wnon-virtual-dtor") - elseif(${CMAKE_COMPILER_IS_GNUCXX}) - message(STATUS "Compiling with GCC") - set(CMAKE_STRICT_COMPILER_SETTINGS "-Wall -Wextra -Wpedantic -Werror") - set(CMAKE_STRICT_CXX_COMPILER_SETTINGS "${CMAKE_STRICT_COMPILER_SETTINGS} -Wnon-virtual-dtor") - elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - message(STATUS "Compiling with MS Visual Studio") - set(CMAKE_STRICT_COMPILER_SETTINGS "/W4") - else() - message(STATUS "Compiler ${CMAKE_CXX_COMPILER_ID}") - endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_STRICT_CXX_COMPILER_SETTINGS}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_STRICT_COMPILER_SETTINGS}") -endif() add_subdirectory(Source) add_subdirectory(Tests) From 99e957d95f474fe22c7bc209415c410a8b807331 Mon Sep 17 00:00:00 2001 From: Bram Oosterhuis Date: Tue, 10 Mar 2026 16:49:17 +0100 Subject: [PATCH 2/3] workflows: remove strict C/CXX flags from the configure --- .github/workflows/Linux build template.yml | 4 ++-- .github/workflows/MacOS build template.yml | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 3ade1cb8..e6b551cb 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -96,8 +96,8 @@ jobs: source venv/bin/activate ${{matrix.architecture == '32' && 'export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig:$PKG_CONFIG_PATH' || 'PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH'}} cmake -G Ninja -S ThunderClientLibraries -B ${{matrix.build_type}}/build/ThunderClientLibraries \ - -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ - -DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ + -DCMAKE_CXX_FLAGS="-m${{matrix.architecture}}" \ + -DCMAKE_C_FLAGS="-m${{matrix.architecture}}" \ -DCMAKE_INSTALL_PREFIX="${{matrix.build_type}}/install/usr" \ -DCMAKE_MODULE_PATH="${PWD}/${{matrix.build_type}}/install/usr/include/WPEFramework/Modules" \ -DBLUETOOTHAUDIOSINK=ON \ diff --git a/.github/workflows/MacOS build template.yml b/.github/workflows/MacOS build template.yml index 69eb5992..e1f28ea0 100644 --- a/.github/workflows/MacOS build template.yml +++ b/.github/workflows/MacOS build template.yml @@ -59,8 +59,6 @@ jobs: run: | source venv/bin/activate cmake -G Ninja -S ThunderClientLibraries -B ${{matrix.build_type}}/build/ThunderClientLibraries \ - -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror" \ - -DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic -Werror" \ -DCMAKE_INSTALL_PREFIX="${{matrix.build_type}}/install/usr" \ -DCMAKE_MODULE_PATH="${PWD}/${{matrix.build_type}}/install/usr/include/WPEFramework/Modules" \ -DCMAKE_CXX_STANDARD=11 \ From c2af7d51e1c4a22ea4cd6765201ee3fc6a002615 Mon Sep 17 00:00:00 2001 From: Bram Oosterhuis Date: Tue, 10 Mar 2026 16:51:32 +0100 Subject: [PATCH 3/3] workflows: remove CXX standard overrule, this is controlled by the cmakes internally --- .github/workflows/MacOS build template.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/MacOS build template.yml b/.github/workflows/MacOS build template.yml index e1f28ea0..def28327 100644 --- a/.github/workflows/MacOS build template.yml +++ b/.github/workflows/MacOS build template.yml @@ -61,7 +61,6 @@ jobs: cmake -G Ninja -S ThunderClientLibraries -B ${{matrix.build_type}}/build/ThunderClientLibraries \ -DCMAKE_INSTALL_PREFIX="${{matrix.build_type}}/install/usr" \ -DCMAKE_MODULE_PATH="${PWD}/${{matrix.build_type}}/install/usr/include/WPEFramework/Modules" \ - -DCMAKE_CXX_STANDARD=11 \ -DBLUETOOTHAUDIOSINK=ON \ -DBLUETOOTHAUDIOSOURCE=ON \ -DCDMI=ON \