From a3cb8c6584d6cc0c2b8fc6aa9dc802aecb8647a1 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Mon, 27 Feb 2023 22:42:15 +0100 Subject: [PATCH] Fix: Fetch pybind11 submodule if not yet present cmake's execute_process pipes COMMANDs together. Thus, `git submodule update` received the output of `git submodule init` as input and didn't do anything. --- core/python/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/python/CMakeLists.txt b/core/python/CMakeLists.txt index cf877722..48bb60fa 100644 --- a/core/python/CMakeLists.txt +++ b/core/python/CMakeLists.txt @@ -21,9 +21,8 @@ set(PYBIND11_CMAKECONFIG_INSTALL_DIR ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/pybind11/CMakeLists.txt") message("Missing content of submodule pybind11: Use 'git clone --recurse-submodule' in future.\n" "Checking out content automatically") - execute_process(COMMAND git submodule init - COMMAND git submodule update - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + execute_process(COMMAND git submodule init WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + execute_process(COMMAND git submodule update WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) endif() #catkin_lint: ignore_once subproject duplicate_cmd add_subdirectory(pybind11)