From c329fc5a065f6ea1187088997bf9d48ca39d24fb Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Tue, 17 Jun 2025 15:50:33 +0200 Subject: [PATCH] Fix #5435 - copy cpprestsdk_char_traits_workaround to buld_dir/src so it's automatically included --- CMakeLists.txt | 3 +++ src/cli/MeasureManager.hpp | 2 +- src/utilities/bcl/RemoteBCL.hpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbbe11092d..fdcc4a836d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -441,6 +441,9 @@ find_package(jsoncpp) find_package(fmt) find_package(SQLite3) find_package(cpprestsdk) +# TODO: this is a workaround for #5398, it should not be there for ever +configure_file("${PROJECT_SOURCE_DIR}/dependencies/cpprestsdk_char_traits_workaround.hpp" "${PROJECT_BINARY_DIR}/src/cpprestsdk_char_traits_workaround.hpp" COPYONLY) + find_package(websocketpp) find_package(Boost) find_package(geographiclib) diff --git a/src/cli/MeasureManager.hpp b/src/cli/MeasureManager.hpp index 205d82359e..f1bbd56a48 100644 --- a/src/cli/MeasureManager.hpp +++ b/src/cli/MeasureManager.hpp @@ -22,7 +22,7 @@ # pragma GCC diagnostic ignored "-Wnon-virtual-dtor" #endif #if __APPLE__ -# include "../../dependencies/cpprestsdk_char_traits_workaround.hpp" +# include // OpenStudio/dependencies/cpprestsdk_char_traits_workaround.hpp #endif #define _TURN_OFF_PLATFORM_STRING // cpprestsdk has an ugly macro U() that makes fmt break... #include diff --git a/src/utilities/bcl/RemoteBCL.hpp b/src/utilities/bcl/RemoteBCL.hpp index dcb0c3d60f..7f3dc8f721 100644 --- a/src/utilities/bcl/RemoteBCL.hpp +++ b/src/utilities/bcl/RemoteBCL.hpp @@ -15,7 +15,7 @@ # pragma GCC diagnostic ignored "-Wnon-virtual-dtor" #endif #if __APPLE__ -# include "../../../dependencies/cpprestsdk_char_traits_workaround.hpp" +# include // OpenStudio/dependencies/cpprestsdk_char_traits_workaround.hpp #endif // Macro U from cpprestsdk is clashing with (cf boost https://github.com/microsoft/cpprestsdk/issues/1214) #define _TURN_OFF_PLATFORM_STRING