From 167a57b43cd646b8f8a471f9d571d998e10375a1 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Wed, 17 Jul 2024 09:15:38 +0200 Subject: [PATCH] Simplify use of scope_guard --- .gitmodules | 4 ++-- core/CMakeLists.txt | 1 - core/scope_guard/CMakeLists.txt | 16 ---------------- .../include/scope_guard/scope_guard.hpp | 1 - core/src/CMakeLists.txt | 2 +- core/{scope_guard => src}/scope_guard | 0 6 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 core/scope_guard/CMakeLists.txt delete mode 120000 core/scope_guard/include/scope_guard/scope_guard.hpp rename core/{scope_guard => src}/scope_guard (100%) diff --git a/.gitmodules b/.gitmodules index 3277f0ecd..d7508c721 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,6 +3,6 @@ url = https://github.com/pybind/pybind11 branch = smart_holder shallow = true -[submodule "scope_guard"] - path = core/scope_guard/scope_guard +[submodule "core/src/scope_guard"] + path = core/src/scope_guard url = https://github.com/ricab/scope_guard diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 004d744a7..12af7292b 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -42,7 +42,6 @@ add_compile_options(-fvisibility-inlines-hidden) set(PROJECT_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/include/moveit/task_constructor) -add_subdirectory(scope_guard) add_subdirectory(src) add_subdirectory(python) add_subdirectory(test) diff --git a/core/scope_guard/CMakeLists.txt b/core/scope_guard/CMakeLists.txt deleted file mode 100644 index e075b08f0..000000000 --- a/core/scope_guard/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -cmake_minimum_required(VERSION 3.11) # for FetchContent -project(scope_guard) - -# handle inclusions and dependencies -include(CheckCXXSymbolExists) -include(CheckCXXCompilerFlag) -include(GNUInstallDirs) - - -add_library(scope_guard INTERFACE) -add_library(scope_guard::scope_guard ALIAS scope_guard) # for consumption via add_subdirectory() - -target_include_directories(scope_guard - INTERFACE - include # assuming we move the header file to an `include` directory -) diff --git a/core/scope_guard/include/scope_guard/scope_guard.hpp b/core/scope_guard/include/scope_guard/scope_guard.hpp deleted file mode 120000 index ce1a27a15..000000000 --- a/core/scope_guard/include/scope_guard/scope_guard.hpp +++ /dev/null @@ -1 +0,0 @@ -../../scope_guard/scope_guard.hpp \ No newline at end of file diff --git a/core/src/CMakeLists.txt b/core/src/CMakeLists.txt index fe447a917..135b0c986 100644 --- a/core/src/CMakeLists.txt +++ b/core/src/CMakeLists.txt @@ -37,7 +37,7 @@ add_library(${PROJECT_NAME} solvers/pipeline_planner.cpp solvers/multi_planner.cpp ) -target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} fmt::fmt scope_guard::scope_guard) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} fmt::fmt) target_include_directories(${PROJECT_NAME} PUBLIC $ PUBLIC $ diff --git a/core/scope_guard/scope_guard b/core/src/scope_guard similarity index 100% rename from core/scope_guard/scope_guard rename to core/src/scope_guard