mirror of
https://github.com/badaix/snapcast.git
synced 2025-04-29 10:17:16 +02:00
Disable "deprecated-declarations" warning on macos
This commit is contained in:
parent
90a720628e
commit
c77040ee1e
3 changed files with 17 additions and 14 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -134,7 +134,7 @@ jobs:
|
||||||
-DBOOST_ROOT=boost_${BOOST_VERSION} \
|
-DBOOST_ROOT=boost_${BOOST_VERSION} \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
-DCMAKE_CXX_FLAGS="-I/usr/local/include -DCMAKE_CXX_FLAGS=-DJSON_HAS_CPP_14 -Wno-deprecated-declarations"
|
-DCMAKE_CXX_FLAGS="-I/usr/local/include -DCMAKE_CXX_FLAGS=-DJSON_HAS_CPP_14"
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||||
- name: build
|
- name: build
|
||||||
|
|
|
@ -26,6 +26,17 @@ IF (TIDY)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
set(MACOSX TRUE)
|
||||||
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||||
|
set (FREEBSD TRUE)
|
||||||
|
if (BUILD_CLIENT)
|
||||||
|
message(FATAL_ERROR "Snapclient not yet supported for FreeBSD, use \"-DBUILD_CLIENT=OFF\"")
|
||||||
|
endif()
|
||||||
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Android")
|
||||||
|
set (ANDROID TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# warning level 4 and all warnings as errors
|
# warning level 4 and all warnings as errors
|
||||||
|
@ -39,6 +50,10 @@ if (MSVC)
|
||||||
else()
|
else()
|
||||||
# lots of warnings and all warnings as errors
|
# lots of warnings and all warnings as errors
|
||||||
add_compile_options(-Wall -Wextra -pedantic -Wno-unused-function)
|
add_compile_options(-Wall -Wextra -pedantic -Wno-unused-function)
|
||||||
|
if (MACOSX)
|
||||||
|
add_compile_options(-Wno-deprecated-declarations)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WERROR)
|
if (WERROR)
|
||||||
add_compile_options(-Werror)
|
add_compile_options(-Werror)
|
||||||
endif()
|
endif()
|
||||||
|
@ -83,19 +98,6 @@ if (NOT BUILD_CLIENT AND NOT BUILD_SERVER)
|
||||||
message(FATAL_ERROR "One or both of BUILD_CLIENT or BUILD_SERVER must be set to ON to build")
|
message(FATAL_ERROR "One or both of BUILD_CLIENT or BUILD_SERVER must be set to ON to build")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
||||||
set(MACOSX TRUE)
|
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
|
||||||
set (FREEBSD TRUE)
|
|
||||||
if (BUILD_CLIENT)
|
|
||||||
message(FATAL_ERROR "Snapclient not yet supported for FreeBSD, use \"-DBUILD_CLIENT=OFF\"")
|
|
||||||
endif()
|
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Android")
|
|
||||||
set (ANDROID TRUE)
|
|
||||||
# if (BUILD_SERVER)
|
|
||||||
# message(FATAL_ERROR "Snapserver not yet supported for Android, use \"-DBUILD_SERVER=OFF\"")
|
|
||||||
# endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Configure paths
|
# Configure paths
|
||||||
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
|
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
// 3rd party headers
|
// 3rd party headers
|
||||||
#include <boost/beast/core.hpp>
|
#include <boost/beast/core.hpp>
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(__clang__)
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
|
Loading…
Add table
Reference in a new issue