Skip to content

Commit

Permalink
Merge pull request eclipse-iceoryx#2247 from elBoberido/iox-2011-cmak…
Browse files Browse the repository at this point in the history
…e-patch-for-cpptoml

iox-eclipse-iceoryx#2011 Add patch to use cmake 3.16 for cpptoml
  • Loading branch information
elBoberido authored Apr 8, 2024
2 parents 67223fe + 2a2c00b commit b505025
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions iceoryx_posh/cmake/cpptoml/0001-cpptoml-cmake-version.patch
Original file line number Diff line number Diff line change
@@ -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)
9 changes: 9 additions & 0 deletions iceoryx_posh/cmake/cpptoml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} )
Expand Down

0 comments on commit b505025

Please sign in to comment.