From ceb275b41ec0e6d3887f0aa4eb591c1ef019d81d Mon Sep 17 00:00:00 2001 From: Martin Stump <martin.stump@mercedes-benz.com> Date: Mon, 19 Dec 2022 14:00:17 +0100 Subject: [PATCH] Add verify_interface_header_set.cpp * Add a new translation unit which includes all interface headers * Adds an entry to the compilation for clang tooling * Ensures that all headers compile successfully * Remove superfluous globbing Signed-off-by: Martin Stump <martin.stump@mercedes-benz.com> --- CMakeLists.txt | 6 ---- test/CMakeLists.txt | 2 +- test/verify_interface_header_set.cpp | 52 ++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 test/verify_interface_header_set.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index edc325c..6ffeff2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,12 +75,6 @@ CPMAddPackage( ) # Add library -file( - GLOB_RECURSE HEADERS - RELATIVE ${PROJECT_SOURCE_DIR}/include - CONFIGURE_DEPENDS "*.h" -) - add_library(MantleAPI INTERFACE) add_library(MantleAPI::MantleAPI ALIAS MantleAPI) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4b804a2..8436799 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -18,7 +18,7 @@ CPMAddPackage( add_executable(MantleAPITest) -target_sources(MantleAPITest PUBLIC interface_test.cpp) +target_sources(MantleAPITest PUBLIC interface_test.cpp verify_interface_header_set.cpp) target_include_directories(MantleAPITest PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/test>) diff --git a/test/verify_interface_header_set.cpp b/test/verify_interface_header_set.cpp new file mode 100644 index 0000000..623afb7 --- /dev/null +++ b/test/verify_interface_header_set.cpp @@ -0,0 +1,52 @@ +/****************************************************************************** + * Copyright (c) 2022 Mercedes-Benz Tech Innovation GmbH + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + ******************************************************************************/ + +//------------------------------------------------------------------------------ +/// @file verify_interface_header_set.cpp +/// @brief Compile all interface headers +/// @details Compiling all interface headers will not only ensure that they +/// actually compile successfully, but will also add an entry to the +/// compilation database for clang tooling. +//------------------------------------------------------------------------------ + +#include "MantleAPI/Common/bounding_box.h" +#include "MantleAPI/Common/dimension.h" +#include "MantleAPI/Common/floating_point_helper.h" +#include "MantleAPI/Common/i_geometry_helper.h" +#include "MantleAPI/Common/i_identifiable.h" +#include "MantleAPI/Common/orientation.h" +#include "MantleAPI/Common/poly_line.h" +#include "MantleAPI/Common/pose.h" +#include "MantleAPI/Common/position.h" +#include "MantleAPI/Common/route_definition.h" +#include "MantleAPI/Common/spline.h" +#include "MantleAPI/Common/time_utils.h" +#include "MantleAPI/Common/trajectory.h" +#include "MantleAPI/Common/vector.h" +#include "MantleAPI/EnvironmentalConditions/road_condition.h" +#include "MantleAPI/EnvironmentalConditions/weather.h" +#include "MantleAPI/Execution/i_environment.h" +#include "MantleAPI/Execution/i_scenario_engine.h" +#include "MantleAPI/Execution/scenario_info.h" +#include "MantleAPI/Map/i_coord_converter.h" +#include "MantleAPI/Map/i_lane_location_query_service.h" +#include "MantleAPI/Map/i_route.h" +#include "MantleAPI/Map/lane_definition.h" +#include "MantleAPI/Map/map_details.h" +#include "MantleAPI/Traffic/control_strategy.h" +#include "MantleAPI/Traffic/default_routing_behavior.h" +#include "MantleAPI/Traffic/entity_helper.h" +#include "MantleAPI/Traffic/entity_properties.h" +#include "MantleAPI/Traffic/i_controller.h" +#include "MantleAPI/Traffic/i_controller_config.h" +#include "MantleAPI/Traffic/i_controller_repository.h" +#include "MantleAPI/Traffic/i_entity.h" +#include "MantleAPI/Traffic/i_entity_repository.h" +#include "MantleAPI/Traffic/traffic_light_properties.h" -- GitLab