From fb25e72ad0eb0d63a0ca13432d0a8ae3bd194dc7 Mon Sep 17 00:00:00 2001 From: Bram Oosterhuis Date: Tue, 10 Mar 2026 14:42:24 +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 ------------------ OpenCDMi/CMakeLists.txt | 2 +- SecurityAgent/CMakeLists.txt | 2 +- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 84d202bb..5c3eac81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,24 +38,6 @@ option(PLUGIN_WEBKITBROWSER "Include WebKitBrowser plugin" OFF) option(PLUGINS_CREATE_IPKG_TARGETS "Generate the CPack configuration for package generation" OFF) -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() if(PLUGIN_BRIDGELINK) add_subdirectory(BridgeLink) diff --git a/OpenCDMi/CMakeLists.txt b/OpenCDMi/CMakeLists.txt index 7037ae19..3de1a1f4 100644 --- a/OpenCDMi/CMakeLists.txt +++ b/OpenCDMi/CMakeLists.txt @@ -54,7 +54,7 @@ add_library(${MODULE_NAME} SHARED Module.cpp) if(CMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-gnu-unique") + target_compile_options(${MODULE_NAME} PRIVATE -fno-gnu-unique) endif() set_target_properties(${MODULE_NAME} PROPERTIES diff --git a/SecurityAgent/CMakeLists.txt b/SecurityAgent/CMakeLists.txt index 629ea57b..9aacc0f9 100644 --- a/SecurityAgent/CMakeLists.txt +++ b/SecurityAgent/CMakeLists.txt @@ -53,7 +53,7 @@ add_library(${MODULE_NAME} SHARED # Following compilation flag is added as SecurityAgent plugin uses regex that # prevents the plugin from unloading from memory after deactivation. -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-gnu-unique") +target_compile_options(${MODULE_NAME} PRIVATE -fno-gnu-unique) set_target_properties(${MODULE_NAME} PROPERTIES CXX_STANDARD ${CXX_STD} From 3e5f81c3630fe50762490f9a9e74fd0736c2da7e Mon Sep 17 00:00:00 2001 From: Bram Oosterhuis Date: Tue, 10 Mar 2026 14:43:54 +0100 Subject: [PATCH 2/3] Update workflow to used the local path --- .github/workflows/Build ThunderNanoServicesRDK on Linux.yml | 2 +- .github/workflows/Build ThunderNanoServicesRDK on MacOS.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build ThunderNanoServicesRDK on Linux.yml b/.github/workflows/Build ThunderNanoServicesRDK on Linux.yml index 8cd8d81b..a3b7a676 100644 --- a/.github/workflows/Build ThunderNanoServicesRDK on Linux.yml +++ b/.github/workflows/Build ThunderNanoServicesRDK on Linux.yml @@ -20,4 +20,4 @@ jobs: ThunderNanoServicesRDK: needs: ThunderInterfaces - uses: WebPlatformForEmbedded/ThunderNanoServicesRDK/.github/workflows/Linux build template.yml@master + uses: ./.github/workflows/Linux build template.yml diff --git a/.github/workflows/Build ThunderNanoServicesRDK on MacOS.yml b/.github/workflows/Build ThunderNanoServicesRDK on MacOS.yml index d73a82cc..4eb88747 100644 --- a/.github/workflows/Build ThunderNanoServicesRDK on MacOS.yml +++ b/.github/workflows/Build ThunderNanoServicesRDK on MacOS.yml @@ -20,4 +20,4 @@ jobs: ThunderNanoServicesRDK_MacOS: needs: ThunderInterfaces_MacOS - uses: WebPlatformForEmbedded/ThunderNanoServicesRDK/.github/workflows/MacOS build template.yml@master + uses: ./.github/workflows/MacOS build template.yml From 393f05f5992ec5023012cc2ca54a90f4634b32a3 Mon Sep 17 00:00:00 2001 From: Bram Oosterhuis Date: Tue, 10 Mar 2026 16:47:32 +0100 Subject: [PATCH 3/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 9f71d3e1..d10dc1ba 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -116,8 +116,8 @@ jobs: source venv/bin/activate export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/${{matrix.architecture == '32' && 'i386' || 'x86_64'}}-linux-gnu/pkgconfig:$PKG_CONFIG_PATH cmake -G Ninja -S ThunderNanoServicesRDK -B ${{matrix.build_type}}/build/ThunderNanoServicesRDK \ - -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" \ -DPLUGIN_BRIDGELINK=ON \ diff --git a/.github/workflows/MacOS build template.yml b/.github/workflows/MacOS build template.yml index bd3581a1..c4c5e239 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 ThunderNanoServicesRDK -B ${{matrix.build_type}}/build/ThunderNanoServicesRDK \ - -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" \ -DPLUGIN_DEVICEIDENTIFICATION=OFF \