diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2018-06-14 18:59:18 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2018-06-14 19:04:43 -0700 |
| commit | 239b35330152a4813e1b5575bd8b1b01c9bba9d5 (patch) | |
| tree | b6f5f5c44996d3cc1620284a9f745aab8efe8360 | |
| parent | 7ba1c76781afd4ab4cd5afda8f21d296715f780d (diff) | |
| download | vcpkg-239b35330152a4813e1b5575bd8b1b01c9bba9d5.tar.gz vcpkg-239b35330152a4813e1b5575bd8b1b01c9bba9d5.zip | |
[yaml-cpp] Fix _NOEXCEPT
| -rw-r--r-- | ports/yaml-cpp/0001-noexcept.patch | 36 | ||||
| -rw-r--r-- | ports/yaml-cpp/CONTROL | 2 | ||||
| -rw-r--r-- | ports/yaml-cpp/portfile.cmake | 2 |
3 files changed, 39 insertions, 1 deletions
diff --git a/ports/yaml-cpp/0001-noexcept.patch b/ports/yaml-cpp/0001-noexcept.patch new file mode 100644 index 000000000..eb208eb5e --- /dev/null +++ b/ports/yaml-cpp/0001-noexcept.patch @@ -0,0 +1,36 @@ +diff --git a/include/yaml-cpp/exceptions.h b/include/yaml-cpp/exceptions.h
+index 9c96859..a6045ee 100644
+--- a/include/yaml-cpp/exceptions.h
++++ b/include/yaml-cpp/exceptions.h
+@@ -15,10 +15,10 @@
+
+ // This is here for compatibility with older versions of Visual Studio
+ // which don't support noexcept
+-#ifdef _MSC_VER
+- #define YAML_CPP_NOEXCEPT _NOEXCEPT
+-#else
++#if _MSC_VER >= 1900
+ #define YAML_CPP_NOEXCEPT noexcept
++#else
++ #define YAML_CPP_NOEXCEPT _NOEXCEPT
+ #endif
+
+ namespace YAML {
+diff --git a/src/exceptions.cpp b/src/exceptions.cpp
+index 9b6d891..931b4bc 100644
+--- a/src/exceptions.cpp
++++ b/src/exceptions.cpp
+@@ -2,10 +2,10 @@
+
+ // This is here for compatibility with older versions of Visual Studio
+ // which don't support noexcept
+-#ifdef _MSC_VER
+- #define YAML_CPP_NOEXCEPT _NOEXCEPT
+-#else
++#if _MSC_VER >= 1900
+ #define YAML_CPP_NOEXCEPT noexcept
++#else
++ #define YAML_CPP_NOEXCEPT _NOEXCEPT
+ #endif
+
+ namespace YAML {
diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL index 1e2d0e5c9..bec9b7e13 100644 --- a/ports/yaml-cpp/CONTROL +++ b/ports/yaml-cpp/CONTROL @@ -1,3 +1,3 @@ Source: yaml-cpp -Version: 0.6.2 +Version: 0.6.2-1 Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake index 071931f64..6233bc076 100644 --- a/ports/yaml-cpp/portfile.cmake +++ b/ports/yaml-cpp/portfile.cmake @@ -5,6 +5,8 @@ vcpkg_from_github( REF yaml-cpp-0.6.2 SHA512 fea8ce0a20a00cbc75023d1db442edfcd32d0ac57a3c41b32ec8d56f87cc1d85d7dd7a923ce662f5d3a315f91a736d6be0d649997acd190915c1d68cc93795e4 HEAD_REF master + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-noexcept.patch ) vcpkg_configure_cmake( |
