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 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 \ 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}