Skip to content

Commit

Permalink
Warnings are no longer leaking from Thunder, so lets add them back
Browse files Browse the repository at this point in the history
  • Loading branch information
VeithMetro committed Aug 23, 2023
1 parent ffdbb9a commit de6fb8f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
cmake_minimum_required(VERSION 3.3)
project(NanoServices)

find_package(WPEFramework)

option(PLUGIN_AVS "Include AVS plugin" OFF)
option(PLUGIN_BACKOFFICE "Include BackOffice plugin" OFF)
option(PLUGIN_BLUETOOTH "Include Bluetooth plugin" OFF)
Expand Down Expand Up @@ -61,6 +63,25 @@ option(PLUGIN_WEBSHELL "Include WebShell plugin" OFF)
option(PLUGIN_WIFICONTROL "Include WifiControl plugin" OFF)
option(PLUGIN_FILETRANSFER "Include FileTransfer plugin" 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(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()
Expand Down

0 comments on commit de6fb8f

Please sign in to comment.