From 6b73b7e93c8f624383c593c93bb36f17a399cc48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Sat, 8 Jan 2022 08:30:47 +0100 Subject: [PATCH] Enabling c++17 deprecated features in clang --- CMakeLists.txt | 2 +- samples/Jzon.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c2158f7798..4749aff789 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ option( EXIV2_ENABLE_WEBREADY "Build webready support into library" option( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo (WEBREADY)" OFF ) option( EXIV2_ENABLE_BMFF "Build with BMFF support" ON ) -option( EXIV2_BUILD_SAMPLES "Build sample applications" OFF ) +option( EXIV2_BUILD_SAMPLES "Build sample applications" ON ) option( EXIV2_BUILD_EXIV2_COMMAND "Build exiv2 command-line executable" ON ) option( EXIV2_BUILD_UNIT_TESTS "Build unit tests" OFF ) option( EXIV2_BUILD_FUZZ_TESTS "Build fuzz tests (libFuzzer)" OFF ) diff --git a/samples/Jzon.cpp b/samples/Jzon.cpp index f73d8f1545..357de7e080 100644 --- a/samples/Jzon.cpp +++ b/samples/Jzon.cpp @@ -25,9 +25,12 @@ THE SOFTWARE. #define JzonAPI __declspec(dllexport) #endif -#ifdef WIN32 +#ifdef _MSC_VER #define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS #endif +#ifdef __clang__ +#define _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES +#endif #include "Jzon.h"