Skip to content

Commit a19e696

Browse files
authored
Update msgpack-c and selectively add boost (CoolProp#2450)
(like was done in teqp)
1 parent 991e3a0 commit a19e696

File tree

8 files changed

+62
-7
lines changed

8 files changed

+62
-7
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
/dev/figs
1616
/dev/builder
17+
/boost_CoolProp
1718

1819
/wrappers/Python/build
1920
/wrappers/Python/cmake_build

CMakeLists.txt

+16
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,20 @@ endif()
208208
set(COOLPROP_MSVC_ALL "/MTd" "/MT" "/MDd" "/MD"
209209
)# order matters "/MXd" before "/MX"
210210

211+
set(ZIPFN "${CMAKE_CURRENT_SOURCE_DIR}/dev/docker/boost_bcp_docker/boost_CoolProp.tar.xz")
212+
set(OUTFN "${CMAKE_CURRENT_SOURCE_DIR}/boost_CoolProp/boost/version.hpp")
213+
if (EXISTS ${ZIPFN})
214+
if(NOT EXISTS ${OUTFN})
215+
execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xJf ${ZIPFN}
216+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
217+
message(STATUS "Untarred boost headers")
218+
endif()
219+
else()
220+
message(FATAL_ERROR "tar.xz of boost sources needed for teqp cannot be found")
221+
endif()
222+
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/boost_CoolProp")
223+
224+
211225
#######################################
212226
# FIND ALL SOURCES #
213227
#-------------------------------------#
@@ -251,6 +265,8 @@ set(APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}")
251265
list(APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/externals/Eigen")
252266
list(APPEND APP_INCLUDE_DIRS
253267
"${CMAKE_CURRENT_SOURCE_DIR}/externals/msgpack-c/include")
268+
list(APPEND APP_INCLUDE_DIRS
269+
"${CMAKE_CURRENT_SOURCE_DIR}/boost_CoolProp")
254270
list(APPEND APP_INCLUDE_DIRS
255271
"${CMAKE_CURRENT_SOURCE_DIR}/externals/fmtlib/include")
256272
list(APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/externals/fmtlib"
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Use docker compose up --build to spin up this job
2+
## which will generate a .tar.xz file in the working directory
3+
4+
FROM ubuntu:24.04
5+
6+
RUN apt-get -y -m update && DEBIAN_FRONTEND=noninteractive apt-get install -y cmake g++ git zip wget xz-utils
7+
8+
RUN mkdir /boost && \
9+
wget -c --no-check-certificate https://boostorg.jfrog.io/artifactory/main/release/1.87.0/source/boost_1_87_0_rc1.tar.gz -O - | tar -xz -C /boost && \
10+
cd /boost/boost_1_87_0/ && \
11+
./bootstrap.sh && \
12+
./b2 tools/bcp
13+
14+
WORKDIR /boost/boost_1_87_0/
15+
RUN mkdir /boost_CoolProp && \
16+
./bin.v2/tools/bcp/gcc-13/debug/x86_64/link-static/threading-multi/visibility-hidden/bcp predef/other/endian.h boost/fusion/sequence/intrinsic/size.hpp boost/fusion/algorithm/iteration/for_each.hpp boost/fusion/include/mpl.hpp boost/fusion/sequence/intrinsic/at.hpp boost/utility/string_ref.hpp boost/utility/string_view.hpp boost/mpl/size.hpp boost/variant.hpp boost/assert.hpp boost/preprocessor.hpp boost/fusion/support/is_sequence.hpp boost/optional.hpp boost/operators.hpp boost/version.hpp /boost_CoolProp && \
17+
zip -r /boost_CoolProp.zip /boost_CoolProp && \
18+
tar cJf /boost_CoolProp.tar.xz /boost_CoolProp
19+
20+
CMD cp /*.tar.xz /output

dev/docker/boost_bcp_docker/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# INFO
2+
3+
Just a tiny docker container used to extract the necessary parts of ``boost`` with the use of the tool ``bcp``
4+
5+
To run: ``docker-compose up --build``
6+
7+
The output will be a ``.tar.xz`` file in this folder with the bits and pieces needed to include.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '3.2'
2+
3+
services:
4+
runner:
5+
build:
6+
context: ./
7+
dockerfile: Dockerfile
8+
volumes:
9+
- type: bind
10+
source: .
11+
target: /output

externals/msgpack-c

Submodule msgpack-c updated 295 files

include/CPmsgpack.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# pragma warning(disable : 4267)
55
#endif
66

7-
// Workaround MSVC endiannes issues
8-
#if defined(_MSC_VER) && ( defined(_M_ARM) || defined(_M_ARM64) )
9-
# define MSGPACK_ENDIAN_LITTLE_BYTE
10-
#endif
7+
//// Workaround MSVC endiannes issues
8+
//#if defined(_MSC_VER) && ( defined(_M_ARM) || defined(_M_ARM64) )
9+
//# define MSGPACK_ENDIAN_LITTLE_BYTE
10+
//#endif
1111

1212
#include "msgpack.hpp"
1313

14-
#if defined(MSGPACK_ENDIAN_LITTLE_BYTE)
14+
/* #if defined (MSGPACK_ENDIAN_LITTLE_BYTE)
1515
# undef MSGPACK_ENDIAN_LITTLE_BYTE
16-
#endif
16+
#endif*/
1717

1818
#ifdef _MSC_VER
1919
# pragma warning(pop)

0 commit comments

Comments
 (0)