[fmt] Fix coolprop build error

This commit is contained in:
wangli28 2020-04-09 08:04:02 +00:00
parent 279867cb0c
commit 002cf744fc
3 changed files with 18 additions and 5 deletions

View File

@ -1,5 +1,5 @@
Source: coolprop
Version: 6.1.0-4
Version: 6.1.0-5
Homepage: https://github.com/CoolProp/CoolProp
Description: Thermophysical properties for the masses
Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers

View File

@ -0,0 +1,13 @@
diff --git a/src/ODEIntegrators.cpp b/src/ODEIntegrators.cpp
index ce86cf6..681db13 100644
--- a/src/ODEIntegrators.cpp
+++ b/src/ODEIntegrators.cpp
@@ -4,6 +4,8 @@
#include "CPstrings.h"
#include "Exceptions.h"
#include <algorithm>
+#undef max
+#undef min
bool ODEIntegrators::AdaptiveRK54(AbstractODEIntegrator &ode, double tstart, double tend, double hmin, double hmax, double eps_allowed, double step_relax)
{

View File

@ -1,4 +1,3 @@
include(vcpkg_common_functions)
set(PORT_VERSION 6.1.0)
vcpkg_from_github(
@ -8,12 +7,13 @@ vcpkg_from_github(
SHA512 a44eafc84f2b88259d7bcf6cfa81daeb81ea9d55bd356e59b3ef77b6f68ea405961c7cb54ba899e3896bb2a02d3e01119a4a51f72899126c8da6081fa2ece948
HEAD_REF master
PATCHES
${CMAKE_CURRENT_LIST_DIR}/fmt-fix.patch
fmt-fix.patch
fix-builderror.patch
)
vcpkg_find_acquire_program(PYTHON2)
get_filename_component(PYTHON2_DIR ${PYTHON2} DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${PYTHON2_DIR}")
vcpkg_add_to_path(${PYTHON2_DIR})
file(REMOVE_RECURSE ${SOURCE_PATH}/externals)
@ -118,6 +118,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER} ${CURRENT_PAC
# Handle copyright
file(
INSTALL ${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/coolprop
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
RENAME copyright
)