From 9e598e0d682a36c2b1253a43ac413c955101eb94 Mon Sep 17 00:00:00 2001 From: Cesare Tonola Date: Mon, 20 Jan 2025 15:44:46 +0100 Subject: [PATCH] fix clang format --- graph_core/.clang-format | 23 +++++++++---------- .../cmake_config/clang_format_target.sh | 2 +- .../cmake_config/graph_coreConfig.cmake.in | 8 +------ 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/graph_core/.clang-format b/graph_core/.clang-format index f3feac2a..d6138d89 100644 --- a/graph_core/.clang-format +++ b/graph_core/.clang-format @@ -50,15 +50,14 @@ SpaceAfterCStyleCast: false BreakBeforeBraces: Custom # Control of individual brace wrapping cases -BraceWrapping: { - AfterClass: 'true' - AfterControlStatement: 'true' - AfterEnum : 'true' - AfterFunction : 'true' - AfterNamespace : 'true' - AfterStruct : 'true' - AfterUnion : 'true' - BeforeCatch : 'true' - BeforeElse : 'true' - IndentBraces : 'false' -} +BraceWrapping: + AfterClass: true + AfterControlStatement: true + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterStruct: true + AfterUnion: true + BeforeCatch: true + BeforeElse: true + IndentBraces: false diff --git a/graph_core/cmake_config/clang_format_target.sh b/graph_core/cmake_config/clang_format_target.sh index 63d18c03..4af1a6dd 100755 --- a/graph_core/cmake_config/clang_format_target.sh +++ b/graph_core/cmake_config/clang_format_target.sh @@ -3,7 +3,7 @@ # Directory base del progetto (una directory sopra lo script) PROJECT_DIR="$(cd "$(dirname "$0")/.." && pwd)" -echo "Checking for clang-format..." +echo "Checking for clang-format in $PROJECT_DIR..." if ! command -v clang-format > /dev/null 2>&1; then echo "clang-format not found, skipping format target" diff --git a/graph_core/cmake_config/graph_coreConfig.cmake.in b/graph_core/cmake_config/graph_coreConfig.cmake.in index 24471fe8..f26fb899 100644 --- a/graph_core/cmake_config/graph_coreConfig.cmake.in +++ b/graph_core/cmake_config/graph_coreConfig.cmake.in @@ -8,13 +8,7 @@ find_dependency(cnr_param REQUIRED) find_dependency(cnr_logger REQUIRED) find_dependency(cnr_class_loader REQUIRED) -if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/graph_coreTargets.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/graph_coreTargets.cmake") -elseif(EXISTS "@CMAKE_INSTALL_PREFIX@/share/graph_core/cmake/graph_coreTargets.cmake") - include("@CMAKE_INSTALL_PREFIX@/share/graph_core/cmake/graph_coreTargets.cmake") -else() - message(FATAL_ERROR "graph_coreTargets.cmake not found!") -endif() +include("@CMAKE_INSTALL_PREFIX@/share/graph_core/cmake/graph_coreTargets.cmake") set_and_check(@PROJECT_NAME@_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@" ${Eigen3_INCLUDE_DIRS} ${cnr_param_INCLUDE_DIRS} ${cnr_logger_INCLUDE_DIRS} ${cnr_class_loader_INCLUDE_DIRS}) set(@PROJECT_NAME@_LIBRARIES @PROJECT_NAME@ ${Eigen3_LIBRARIES} ${cnr_param_LIBRARIES} ${cnr_logger_LIBRARIES} ${cnr_class_loader_LIBRARIES})