[nana, fmi4cpp] Fix Visual Studio 2019 deprecates <experimental/filesystem>. (#7021)

This commit is contained in:
wangli28 2019-06-26 02:00:48 +08:00 committed by Phil Christensen
parent 14d1575e0b
commit 90ad82908e
6 changed files with 43 additions and 2 deletions

View File

@ -1,5 +1,5 @@
Source: fmi4cpp
Version: 0.7.0
Version: 0.7.0-1
Description: FMI 2.0 implementation written in modern C++
Build-Depends: boost-property-tree, libzip[openssl]

View File

@ -0,0 +1,25 @@
diff --git a/include/fmi4cpp/fmu_resource.hpp b/include/fmi4cpp/fmu_resource.hpp
index 98f2067..8e88dcf 100644
--- a/include/fmi4cpp/fmu_resource.hpp
+++ b/include/fmi4cpp/fmu_resource.hpp
@@ -24,6 +24,7 @@
#ifndef FMI4CPP_FMURESOURCE_HPP
#define FMI4CPP_FMURESOURCE_HPP
+#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#include <string>
#include <experimental/filesystem>
diff --git a/src/fmi2/fmu.cpp b/src/fmi2/fmu.cpp
index a0d5f75..bd01487 100644
--- a/src/fmi2/fmu.cpp
+++ b/src/fmi2/fmu.cpp
@@ -26,6 +26,8 @@
#include <curl/curl.h>
#endif
+#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
+
#include <utility>
#include <experimental/filesystem>

View File

@ -18,6 +18,8 @@ vcpkg_from_github(
REF v0.7.0
SHA512 5846f5b28badb5b4836ffd9d284f602dd243df20d3c82cab5e2b62b8be37e0ab05b7422bca066f37ca67ee0d5b35abd2febe87f623fc3b9854d245e86e1e21fe
HEAD_REF master
PATCHES
fix-build_error.patch
)
set(WITH_CURL OFF)

View File

@ -1,5 +1,5 @@
Source: nana
Version: 1.7.1
Version: 1.7.1-1
Homepage: https://github.com/cnjinhao/nana
Description: Cross-platform library for GUI programming in modern C++ style.
Build-Depends: libpng, libjpeg-turbo, freetype (!uwp&&!windows), fontconfig (!uwp&&!windows)

View File

@ -0,0 +1,12 @@
diff --git a/include/nana/filesystem/filesystem.hpp b/include/nana/filesystem/filesystem.hpp
index 86b907a..ea8db75 100644
--- a/include/nana/filesystem/filesystem.hpp
+++ b/include/nana/filesystem/filesystem.hpp
@@ -30,6 +30,7 @@
#ifndef NANA_FILESYSTEM_HPP
#define NANA_FILESYSTEM_HPP
#include <nana/push_ignore_diagnostic>
+#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
//Filesystem Selection
#include <nana/config.hpp>

View File

@ -12,6 +12,8 @@ vcpkg_from_github(
REF v1.7.1
SHA512 43bd6f6321557184431935b4fdd636427458e79333879f6310685a70ee25f4344851910e67c52145382c38a3cea9d1761b40c8edbc072a7cc9c62406ed402549
HEAD_REF develop
PATCHES
fix-build-error.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})