diff --git a/configure b/configure index fbc3c1b39..df1d43cfc 100755 --- a/configure +++ b/configure @@ -580,10 +580,6 @@ else darwin*) DEFINES="$DEFINES -DUNIX -DDARWIN" _host_os=darwin - if test "$have_clang" = yes; then - CXXFLAGS="$CXXFLAGS -Wno-documentation-unknown-command -Wno-documentation-pedantic -Wno-poison-system-directories" - CXXFLAGS="$CXXFLAGS -Wno-unknown-warning-option" - fi ;; irix*) DEFINES="$DEFINES -DUNIX" diff --git a/src/common/JoyMap.hxx b/src/common/JoyMap.hxx index 6bf87009e..9b77b09a1 100644 --- a/src/common/JoyMap.hxx +++ b/src/common/JoyMap.hxx @@ -22,7 +22,7 @@ #include "Event.hxx" #include "EventHandlerConstants.hxx" -#include "json.hxx" +#include "json_lib.hxx" /** This class handles controller mappings in Stella. diff --git a/src/common/KeyMap.hxx b/src/common/KeyMap.hxx index b5805225f..0a067eead 100644 --- a/src/common/KeyMap.hxx +++ b/src/common/KeyMap.hxx @@ -22,7 +22,7 @@ #include "Event.hxx" #include "EventHandlerConstants.hxx" #include "StellaKeys.hxx" -#include "json.hxx" +#include "json_lib.hxx" /** This class handles keyboard mappings in Stella. diff --git a/src/common/PJoystickHandler.hxx b/src/common/PJoystickHandler.hxx index 8e43bdf97..ebdec580e 100644 --- a/src/common/PJoystickHandler.hxx +++ b/src/common/PJoystickHandler.hxx @@ -28,7 +28,7 @@ class Event; #include "EventHandlerConstants.hxx" #include "PhysicalJoystick.hxx" #include "Variant.hxx" -#include "json.hxx" +#include "json_lib.hxx" using PhysicalJoystickPtr = shared_ptr; diff --git a/src/common/PKeyboardHandler.cxx b/src/common/PKeyboardHandler.cxx index 108a620b9..6b60ae914 100644 --- a/src/common/PKeyboardHandler.cxx +++ b/src/common/PKeyboardHandler.cxx @@ -19,7 +19,7 @@ #include "Console.hxx" #include "EventHandler.hxx" #include "PKeyboardHandler.hxx" -#include "json.hxx" +#include "json_lib.hxx" using json = nlohmann::json; diff --git a/src/common/PhysicalJoystick.hxx b/src/common/PhysicalJoystick.hxx index 454008f51..cf0456c0e 100644 --- a/src/common/PhysicalJoystick.hxx +++ b/src/common/PhysicalJoystick.hxx @@ -21,7 +21,7 @@ #include "Event.hxx" #include "EventHandlerConstants.hxx" #include "JoyMap.hxx" -#include "json.hxx" +#include "json_lib.hxx" /** An abstraction of a physical (real) joystick in Stella. diff --git a/src/common/jsonDefinitions.hxx b/src/common/jsonDefinitions.hxx index 595789845..a7a394f49 100644 --- a/src/common/jsonDefinitions.hxx +++ b/src/common/jsonDefinitions.hxx @@ -3,7 +3,7 @@ #include "EventHandlerConstants.hxx" #include "Event.hxx" -#include "json.hxx" +#include "json_lib.hxx" #include "StellaKeys.hxx" NLOHMANN_JSON_SERIALIZE_ENUM(JoyAxis, { diff --git a/src/json/json_lib.hxx b/src/json/json_lib.hxx new file mode 100644 index 000000000..30e93293d --- /dev/null +++ b/src/json/json_lib.hxx @@ -0,0 +1,34 @@ +//============================================================================ +// +// SSSS tt lll lll +// SS SS tt ll ll +// SS tttttt eeee ll ll aaaa +// SSSS tt ee ee ll ll aa +// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" +// SS SS tt ee ll ll aa aa +// SSSS ttt eeeee llll llll aaaaa +// +// Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony +// and the Stella Team +// +// See the file "License.txt" for information on usage and redistribution of +// this file, and for a DISCLAIMER OF ALL WARRANTIES. +//============================================================================ + +#ifndef JSON_LIB_HXX +#define JSON_LIB_HXX + +/* + * We can't control the quality of code from outside projects, so for now + * just disable warnings for it. + */ +#ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Weverything" + #include "json.hxx" + #pragma clang diagnostic pop +#else + #include "json.hxx" +#endif + +#endif // JSON_LIB_HXX