diff --git a/iceoryx_posh/cmake/cpptoml/0001-cpptoml-cmake-version.patch b/iceoryx_posh/cmake/cpptoml/0001-cpptoml-cmake-version.patch new file mode 100644 index 0000000000..60b02d0692 --- /dev/null +++ b/iceoryx_posh/cmake/cpptoml/0001-cpptoml-cmake-version.patch @@ -0,0 +1,8 @@ +--- a/CMakeLists.txt 2024-03-26 12:09:54.921829374 +0000 ++++ b/CMakeLists.txt 2024-03-26 12:09:59.552800904 +0000 +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.1.0) ++cmake_minimum_required(VERSION 3.16) + project(cpptoml) + + set(cpptoml_VERSION 0.4.0) diff --git a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt index ffd3fe9f5c..08aff834c2 100644 --- a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt +++ b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt @@ -72,6 +72,15 @@ if(DEFINED CMAKE_TOOLCHAIN_FILE) set(cpptoml_DIR ${cpptoml_DIR} CACHE PATH "" FORCE) endif() +execute_process( + COMMAND git apply -p1 --ignore-space-change --whitespace=nowarn + INPUT_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" + WORKING_DIRECTORY "${SOURCE_DIR}" + RESULT_VARIABLE result) +if(result) + message(WARNING "CMake step [patch] for '${PROJECT_NAME}' failed! Error code: ${result}! Build of '${PROJECT_NAME}' might fail") +endif() + execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" "-DENABLE_LIBCXX=off" "-DCPPTOML_BUILD_EXAMPLES=off" "-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}" "${SOURCE_DIR}" ${CMAKE_ADDITIONAL_OPTIONS} RESULT_VARIABLE result WORKING_DIRECTORY ${BUILD_DIR} )