diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 59fce4be..eefe0845 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -11,8 +11,9 @@ set(CLIENT_SOURCES set(CLIENT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} ${ATOMIC_LIBRARY} common) -set(CLIENT_INCLUDE ${Boost_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/client - ${CMAKE_SOURCE_DIR}) +include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/client) + +include_directories(SYSTEM ${Boost_INCLUDE_DIR}) if(MACOSX) # Bonjour @@ -44,20 +45,20 @@ elseif(NOT ANDROID) if(AVAHI_FOUND) list(APPEND CLIENT_SOURCES browseZeroConf/browse_avahi.cpp) list(APPEND CLIENT_LIBRARIES ${AVAHI_LIBRARIES}) - list(APPEND CLIENT_INCLUDE ${AVAHI_INCLUDE_DIRS}) + include_directories(${AVAHI_INCLUDE_DIRS}) endif(AVAHI_FOUND) # ALSA if(ALSA_FOUND) list(APPEND CLIENT_SOURCES player/alsa_player.cpp) list(APPEND CLIENT_LIBRARIES ${ALSA_LIBRARIES}) - list(APPEND CLIENT_INCLUDE ${ALSA_INCLUDE_DIRS}) + include_directories(${ALSA_INCLUDE_DIRS}) endif(ALSA_FOUND) if(PULSE_FOUND) list(APPEND CLIENT_SOURCES player/pulse_player.cpp) list(APPEND CLIENT_LIBRARIES ${PULSE_LIBRARIES}) - list(APPEND CLIENT_INCLUDE ${PULSE_INCLUDE_DIRS}) + include_directories(${PULSE_INCLUDE_DIRS}) endif(PULSE_FOUND) endif(MACOSX) @@ -79,10 +80,10 @@ else() # Tremor (fixed-point) or libvorbis (floating-point) if(TREMOR_FOUND) list(APPEND CLIENT_LIBRARIES ${TREMOR_LIBRARIES}) - list(APPEND CLIENT_INCLUDE ${TREMOR_INCLUDE_DIRS}) + include_directories(${TREMOR_INCLUDE_DIRS}) elseif(VORBIS_FOUND) list(APPEND CLIENT_LIBRARIES ${VORBIS_LIBRARIES}) - list(APPEND CLIENT_INCLUDE ${VORBIS_INCLUDE_DIRS}) + include_directories(${VORBIS_INCLUDE_DIRS}) link_directories(${VORBIS_LIBRARY_DIRS}) endif(TREMOR_FOUND) @@ -90,32 +91,31 @@ else() if(OGG_FOUND) list(APPEND CLIENT_SOURCES decoder/ogg_decoder.cpp) list(APPEND CLIENT_LIBRARIES ${OGG_LIBRARIES}) - list(APPEND CLIENT_INCLUDE ${OGG_INCLUDE_DIRS}) + include_directories(${OGG_INCLUDE_DIRS}) link_directories(${OGG_LIBRARY_DIRS}) endif(OGG_FOUND) if(FLAC_FOUND) list(APPEND CLIENT_SOURCES decoder/flac_decoder.cpp) list(APPEND CLIENT_LIBRARIES ${FLAC_LIBRARIES}) - list(APPEND CLIENT_INCLUDE ${FLAC_INCLUDE_DIRS}) + include_directories(${FLAC_INCLUDE_DIRS}) link_directories(${FLAC_LIBRARY_DIRS}) endif(FLAC_FOUND) if(OPUS_FOUND) list(APPEND CLIENT_SOURCES decoder/opus_decoder.cpp) list(APPEND CLIENT_LIBRARIES ${OPUS_LIBRARIES}) - list(APPEND CLIENT_INCLUDE ${OPUS_INCLUDE_DIRS}) + include_directories(${OPUS_INCLUDE_DIRS}) link_directories(${OPUS_LIBRARY_DIRS}) endif(OPUS_FOUND) if(SOXR_FOUND) list(APPEND CLIENT_LIBRARIES ${SOXR_LIBRARIES}) - list(APPEND CLIENT_INCLUDE ${SOXR_INCLUDE_DIRS}) + include_directories(${SOXR_INCLUDE_DIRS}) link_directories(${SOXR_LIBRARY_DIRS}) endif(SOXR_FOUND) endif() -include_directories(${CLIENT_INCLUDE}) if(ANDROID) add_executable(libsnapclient.so ${CLIENT_SOURCES}) target_link_libraries(libsnapclient.so ${CLIENT_LIBRARIES} log OpenSLES) diff --git a/client/player/player.cpp b/client/player/player.cpp index 3d329e25..16cb699f 100644 --- a/client/player/player.cpp +++ b/client/player/player.cpp @@ -27,18 +27,10 @@ // 3rd party headers #ifdef SUPPORTS_VOLUME_SCRIPT -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpragmas" -#pragma GCC diagnostic ignored "-Wunused-result" -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wmissing-braces" -#pragma GCC diagnostic ignored "-Wnarrowing" -#pragma GCC diagnostic ignored "-Wc++11-narrowing" #include #include #include #include -#pragma GCC diagnostic pop #endif // standard headers diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 19f2ce99..534886fb 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -33,9 +33,11 @@ set(SERVER_SOURCES set(SERVER_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} ${ATOMIC_LIBRARY} common) -set(SERVER_INCLUDE ${Boost_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/server - ${CMAKE_SOURCE_DIR}) +include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/server) +include_directories(SYSTEM ${Boost_INCLUDE_DIR}) + + if(ANDROID) find_package(vorbis REQUIRED CONFIG) list(APPEND SERVER_LIBRARIES boost::boost) @@ -52,7 +54,7 @@ else() if(AVAHI_FOUND) list(APPEND SERVER_SOURCES publishZeroConf/publish_avahi.cpp) list(APPEND SERVER_LIBRARIES ${AVAHI_LIBRARIES}) - list(APPEND SERVER_INCLUDE ${AVAHI_INCLUDE_DIRS}) + include_directories(${AVAHI_INCLUDE_DIRS}) endif(AVAHI_FOUND) if(BONJOUR_FOUND) @@ -67,7 +69,7 @@ else() list(APPEND SERVER_SOURCES encoder/ogg_encoder.cpp) list(APPEND SERVER_LIBRARIES ${VORBIS_LIBRARIES} ${VORBISENC_LIBRARIES} ${OGG_LIBRARIES}) - list(APPEND SERVER_INCLUDE ${OGG_INCLUDE_DIRS} ${VORBIS_INCLUDE_DIRS} + include_directories(${OGG_INCLUDE_DIRS} ${VORBIS_INCLUDE_DIRS} ${VORBISENC_INCLUDE_DIRS}) link_directories(${VORBIS_LIBRARY_DIRS}) link_directories(${VORBISENC_LIBRARY_DIRS}) @@ -80,38 +82,38 @@ else() if(FLAC_FOUND) list(APPEND SERVER_SOURCES encoder/flac_encoder.cpp) list(APPEND SERVER_LIBRARIES ${FLAC_LIBRARIES}) - list(APPEND SERVER_INCLUDE ${FLAC_INCLUDE_DIRS}) + include_directories(${FLAC_INCLUDE_DIRS}) link_directories(${FLAC_LIBRARY_DIRS}) endif(FLAC_FOUND) if(OPUS_FOUND) list(APPEND SERVER_SOURCES encoder/opus_encoder.cpp) list(APPEND SERVER_LIBRARIES ${OPUS_LIBRARIES}) - list(APPEND SERVER_INCLUDE ${OPUS_INCLUDE_DIRS}) + include_directories(${OPUS_INCLUDE_DIRS}) link_directories(${OPUS_LIBRARY_DIRS}) endif(OPUS_FOUND) if(ALSA_FOUND) list(APPEND SERVER_SOURCES streamreader/alsa_stream.cpp) list(APPEND SERVER_LIBRARIES ${ALSA_LIBRARIES}) - list(APPEND SERVER_INCLUDE ${ALSA_INCLUDE_DIRS}) + include_directories(${ALSA_INCLUDE_DIRS}) endif(ALSA_FOUND) if(JACK_FOUND) list(APPEND SERVER_SOURCES streamreader/jack_stream.cpp) list(APPEND SERVER_LIBRARIES ${JACK_LIBRARIES}) - list(APPEND SERVER_INCLUDE ${JACK_INCLUDE_DIRS}) + include_directories(${JACK_INCLUDE_DIRS}) endif(JACK_FOUND) if(EXPAT_FOUND) list(APPEND SERVER_LIBRARIES ${EXPAT_LIBRARIES}) - list(APPEND SERVER_INCLUDE ${EXPAT_INCLUDE_DIRS}) + include_directories(${EXPAT_INCLUDE_DIRS}) link_directories(${EXPAT_LIBRARY_DIRS}) endif(EXPAT_FOUND) if(SOXR_FOUND) list(APPEND SERVER_LIBRARIES ${SOXR_LIBRARIES}) - list(APPEND SERVER_INCLUDE ${SOXR_INCLUDE_DIRS}) + include_directories(${SOXR_INCLUDE_DIRS}) link_directories(${SOXR_LIBRARY_DIRS}) endif(SOXR_FOUND) endif() @@ -119,7 +121,6 @@ endif() # list(APPEND SERVER_LIBRARIES Boost::boost) list(APPEND SERVER_LIBRARIES OpenSSL::Crypto OpenSSL::SSL) -include_directories(${SERVER_INCLUDE}) if(ANDROID) add_executable(libsnapserver.so ${SERVER_SOURCES}) target_link_libraries(libsnapserver.so ${SERVER_LIBRARIES} log) diff --git a/server/control_session_http.hpp b/server/control_session_http.hpp index a1b2900a..f7f31d2c 100644 --- a/server/control_session_http.hpp +++ b/server/control_session_http.hpp @@ -28,13 +28,7 @@ #include #include #include - -#pragma GCC diagnostic push -#if defined(__GNUC__) && !defined(__clang__) -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif #include -#pragma GCC diagnostic pop // standard headers #include diff --git a/server/control_session_ws.hpp b/server/control_session_ws.hpp index a04f12f0..e808bf1f 100644 --- a/server/control_session_ws.hpp +++ b/server/control_session_ws.hpp @@ -23,23 +23,8 @@ #include "control_session.hpp" // 3rd party headers -#pragma GCC diagnostic push -#if defined(__GNUC__) && !defined(__clang__) -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif #include -#pragma GCC diagnostic pop - -#pragma GCC diagnostic push -#if defined(__clang__) -#pragma GCC diagnostic ignored "-Wunknown-warning-option" -#pragma GCC diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" -#pragma GCC diagnostic ignored "-Wdeprecated-copy" -#elif defined(__GNUC__) -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif #include -#pragma GCC diagnostic pop #include #include diff --git a/server/stream_session_ws.hpp b/server/stream_session_ws.hpp index 032fbb3d..685df47c 100644 --- a/server/stream_session_ws.hpp +++ b/server/stream_session_ws.hpp @@ -24,14 +24,7 @@ // 3rd party headers #include -#pragma GCC diagnostic push -#ifdef __clang__ -#pragma GCC diagnostic ignored "-Wunknown-warning-option" -#pragma GCC diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" -#pragma GCC diagnostic ignored "-Wdeprecated-copy" -#endif #include -#pragma GCC diagnostic pop #include #include diff --git a/server/streamreader/stream_control.hpp b/server/streamreader/stream_control.hpp index cad102f1..d25efb7b 100644 --- a/server/streamreader/stream_control.hpp +++ b/server/streamreader/stream_control.hpp @@ -24,19 +24,7 @@ #include "server_settings.hpp" // 3rd party headers -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpragmas" -#pragma GCC diagnostic ignored "-Wunused-result" -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wmissing-braces" -#pragma GCC diagnostic ignored "-Wnarrowing" -#pragma GCC diagnostic ignored "-Wc++11-narrowing" -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#if !defined(__clang__) -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif #include -#pragma GCC diagnostic pop #include // standard headers