diff --git a/MantleAPI/BUILD.bazel b/BUILD.bazel similarity index 100% rename from MantleAPI/BUILD.bazel rename to BUILD.bazel diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dc86dd915a17bd432086cea2e0c08f735b08c27..5fb90ff515356322e7aa179ab957bbea738cb6b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,36 +14,58 @@ cmake_minimum_required(VERSION 3.15.0 FATAL_ERROR) # Add the custom CMake modules to CMake's module path list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") -# Determine if ScenarioAPI is built as a subproject (using add_subdirectory) or if it is the main project. -if(NOT DEFINED ScenarioAPI_MAIN_PROJECT) - set(ScenarioAPI_MAIN_PROJECT OFF) +# Determine if MantleAPI is built as a subproject (using add_subdirectory) or if it is the main project. +if(NOT DEFINED MantleAPI_MAIN_PROJECT) + set(MantleAPI_MAIN_PROJECT OFF) if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) - set(ScenarioAPI_MAIN_PROJECT ON) + set(MantleAPI_MAIN_PROJECT ON) endif() endif() project( - ScenarioAPI + MantleAPI VERSION 0.1.0 - DESCRIPTION "Scenario API, an abstraction layer for environmental simulators" + DESCRIPTION "MantleAPI, an abstraction layer for environmental simulators" LANGUAGES CXX ) # Options that control generation of various targets. -option(ScenarioAPI_DOC "Generate the doc target." ${ScenarioAPI_MAIN_PROJECT}) -option(ScenarioAPI_INSTALL "Generate the install target." ${ScenarioAPI_MAIN_PROJECT}) -option(ScenarioAPI_TEST "Generate the test target." ${ScenarioAPI_MAIN_PROJECT}) -option(ScenarioAPI_PACKAGE "Generate the package target." ${ScenarioAPI_MAIN_PROJECT}) -option(ScenarioAPI_ENABLE_WARNINGS "Enable compiler warnings." ${ScenarioAPI_MAIN_PROJECT}) -option(ScenarioAPI_ENABLE_WERROR "Fail and stop if a warning is triggered." ${ScenarioAPI_MAIN_PROJECT}) - -if(ScenarioAPI_TEST) - enable_testing() +option(MantleAPI_DOC "Generate the doc target." ${MantleAPI_MAIN_PROJECT}) +option(MantleAPI_INSTALL "Generate the install target." ${MantleAPI_MAIN_PROJECT}) +option(MantleAPI_TEST "Generate the test target." ${MantleAPI_MAIN_PROJECT}) +option(MantleAPI_PACKAGE "Generate the package target." ${MantleAPI_MAIN_PROJECT}) +option(MantleAPI_ENABLE_WARNINGS "Enable compiler warnings." ${MantleAPI_MAIN_PROJECT}) +option(MantleAPI_ENABLE_WERROR "Fail and stop if a warning is triggered." ${MantleAPI_MAIN_PROJECT}) + +if(MSVC) + if(MantleAPI_ENABLE_WARNINGS) + add_compile_options(/W4) + endif() + if(MantleAPI_ENABLE_WERROR) + add_compile_options(/WX /wd4996) + endif() +else() + if(MantleAPI_ENABLE_WARNINGS) + add_compile_options(-Wall -Wextra) + endif() + if(MantleAPI_ENABLE_WERROR) + add_compile_options(-Werror -Wno-error=deprecated-declarations) + endif() endif() include(CPM) -add_subdirectory(MantleAPI) -if(ScenarioAPI_PACKAGE) - include(ScenarioAPICPack) +add_subdirectory(include) + +if(MantleAPI_DOC) + add_subdirectory(doc) +endif() + +if(MantleAPI_TEST) + enable_testing() + add_subdirectory(test) +endif() + +if(MantleAPI_PACKAGE) + include(MantleAPICPack) endif() diff --git a/MantleAPI/CMakeLists.txt b/MantleAPI/CMakeLists.txt deleted file mode 100644 index 5e4f73ab7e58403b8a2c8c3a45fd09ea034f82fe..0000000000000000000000000000000000000000 --- a/MantleAPI/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################ -# Copyright (c) 2021 Daimler TSS GmbH -# 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 -################################################################################ - -if(MSVC) - if(ScenarioAPI_ENABLE_WARNINGS) - add_compile_options(/W4) - endif() - if(ScenarioAPI_ENABLE_WERROR) - add_compile_options(/WX /wd4996) - endif() -else() - if(ScenarioAPI_ENABLE_WARNINGS) - add_compile_options(-Wall -Wextra) - endif() - if(ScenarioAPI_ENABLE_WERROR) - add_compile_options(-Werror -Wno-error=deprecated-declarations) - endif() -endif() - -add_subdirectory(include) - -if(ScenarioAPI_DOC) - add_subdirectory(doc) -endif() - -if(ScenarioAPI_TEST) - add_subdirectory(test) -endif() diff --git a/README.md b/README.md index e3f56c49fca2f505969f0ac5849e9e53a4db2c0b..1d860f20d14645601165e5a79572dc5e17434304 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Scenario API +# MantleAPI A collection of interfaces for abstraction between a scenario engine and an environment simulator. It is intended to be usable with a wide variety of scenario description languages by implementing according scenario engines. diff --git a/MantleAPI/WORKSPACE b/WORKSPACE similarity index 100% rename from MantleAPI/WORKSPACE rename to WORKSPACE diff --git a/cmake/ScenarioAPICPack.cmake b/cmake/MantleAPICPack.cmake similarity index 80% rename from cmake/ScenarioAPICPack.cmake rename to cmake/MantleAPICPack.cmake index e35644b50c7f451cc9eca0768733df35e73da947..630f829ec14d0b33c90bf9c67bf12621aefcfbe3 100644 --- a/cmake/ScenarioAPICPack.cmake +++ b/cmake/MantleAPICPack.cmake @@ -1,5 +1,6 @@ ################################################################################ # Copyright (c) 2021 Daimler TSS GmbH +# 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 @@ -8,16 +9,15 @@ # SPDX-License-Identifier: EPL-2.0 ################################################################################ -set(CPACK_PACKAGE_NAME "scenario_api") +set(CPACK_PACKAGE_NAME "${PROJECT_NAME}") set(CPACK_PACKAGE_VENDOR "simopenpass Eclipse project team") set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}) -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Scenario API") -set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}") +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}") set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) set(CPACK_PACKAGE_CHECKSUM SHA512) set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt") diff --git a/cmake/ScenarioAPIConfig.cmake.in b/cmake/MantleAPIConfig.cmake.in similarity index 62% rename from cmake/ScenarioAPIConfig.cmake.in rename to cmake/MantleAPIConfig.cmake.in index b1b31d3e0ee7f063970a07a8299a4a7c0c609e5c..2dc0d3cf15b9902bd2b627d1eb4409d47c5bb8fc 100644 --- a/cmake/ScenarioAPIConfig.cmake.in +++ b/cmake/MantleAPIConfig.cmake.in @@ -1,5 +1,6 @@ ################################################################################ # Copyright (c) 2021 Daimler TSS GmbH +# 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 @@ -10,10 +11,10 @@ @PACKAGE_INIT@ -if(NOT TARGET ScenarioAPI::ScenarioAPI AND NOT ScenarioAPI_BINARY_DIR) - set_and_check(ScenarioAPI_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") - mark_as_advanced(ScenarioAPI_INCLUDE_DIR) - include("${CMAKE_CURRENT_LIST_DIR}/ScenarioAPITargets.cmake") +if(NOT TARGET MantleAPI::MantleAPI AND NOT MantleAPI_BINARY_DIR) + set_and_check(MantleAPI_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") + mark_as_advanced(MantleAPI_INCLUDE_DIR) + include("${CMAKE_CURRENT_LIST_DIR}/MantleAPITargets.cmake") endif() include(CMakeFindDependencyMacro) diff --git a/MantleAPI/doc/CMakeLists.txt b/doc/CMakeLists.txt similarity index 88% rename from MantleAPI/doc/CMakeLists.txt rename to doc/CMakeLists.txt index 871c038bbc077ebac399b25d44be485e72f639aa..fc08f416ed3f34bc87ed203239c83e214038581a 100644 --- a/MantleAPI/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -13,7 +13,7 @@ find_package(Doxygen QUIET REQUIRED dot OPTIONAL_COMPONENTS mscgen dia) set(DOXYGEN_BUILTIN_STL_SUPPORT YES) set(DOXYGEN_DOT_IMAGE_FORMAT svg) set(DOXYGEN_IMAGE_PATH ${CMAKE_CURRENT_LIST_DIR}/images) -set(DOXYGEN_INCLUDE_PATH ${PROJECT_SOURCE_DIR}) +set(DOXYGEN_INCLUDE_PATH ${PROJECT_SOURCE_DIR}/include) set(DOXYGEN_INTERACTIVE_SVG YES) set(DOXYGEN_QUIET YES) set(DOXYGEN_TAB_SIZE 2) @@ -21,6 +21,5 @@ set(DOXYGEN_UML_LOOK YES) set(DOXYGEN_USE_MDFILE_AS_MAINPAGE README.md) doxygen_add_docs( - ${PROJECT_NAME}_doc ${PROJECT_SOURCE_DIR}/README.md ${PROJECT_SOURCE_DIR}/MantleAPI/include - COMMENT "Generate html docs" + ${PROJECT_NAME}_doc ${PROJECT_SOURCE_DIR}/README.md ${PROJECT_SOURCE_DIR}/include COMMENT "Generate html docs" ) diff --git a/MantleAPI/include/CMakeLists.txt b/include/CMakeLists.txt similarity index 66% rename from MantleAPI/include/CMakeLists.txt rename to include/CMakeLists.txt index 3722690d9ee6216328d2180c6c4018d6c5d65b8a..ae895bed9171b73dd8ec920d0b0ac1635a75058e 100644 --- a/MantleAPI/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -34,47 +34,45 @@ file( CONFIGURE_DEPENDS "*.h" ) -add_library(ScenarioAPI INTERFACE) -add_library(ScenarioAPI::ScenarioAPI ALIAS ScenarioAPI) +add_library(MantleAPI INTERFACE) +add_library(MantleAPI::MantleAPI ALIAS MantleAPI) -target_link_libraries(ScenarioAPI INTERFACE units::units) +target_link_libraries(MantleAPI INTERFACE units::units) include(GNUInstallDirs) -set(INSTALL_CONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/ScenarioAPI") +set(INSTALL_CONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/MantleAPI") target_include_directories( - ScenarioAPI INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/MantleAPI/include> - $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> + MantleAPI INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> ) -target_compile_features(ScenarioAPI INTERFACE cxx_std_17) +target_compile_features(MantleAPI INTERFACE cxx_std_17) include(CMakePackageConfigHelpers) configure_package_config_file( - "${PROJECT_SOURCE_DIR}/cmake/ScenarioAPIConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/ScenarioAPIConfig.cmake" + "${PROJECT_SOURCE_DIR}/cmake/MantleAPIConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/MantleAPIConfig.cmake" INSTALL_DESTINATION ${INSTALL_CONFIG_DIR} PATH_VARS CMAKE_INSTALL_INCLUDEDIR ) write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/ScenarioAPIConfigVersion.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/MantleAPIConfigVersion.cmake" VERSION ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion ) -if(ScenarioAPI_INSTALL) +if(MantleAPI_INSTALL) install(DIRECTORY MantleAPI TYPE INCLUDE) - install(TARGETS ScenarioAPI EXPORT ScenarioAPITargets) + install(TARGETS MantleAPI EXPORT MantleAPITargets) install( - EXPORT ScenarioAPITargets + EXPORT MantleAPITargets DESTINATION ${INSTALL_CONFIG_DIR} - NAMESPACE ScenarioAPI:: + NAMESPACE MantleAPI:: ) install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/ScenarioAPIConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/ScenarioAPIConfigVersion.cmake" + FILES "${CMAKE_CURRENT_BINARY_DIR}/MantleAPIConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/MantleAPIConfigVersion.cmake" DESTINATION ${INSTALL_CONFIG_DIR} COMPONENT dev ) diff --git a/MantleAPI/include/MantleAPI/Common/bounding_box.h b/include/MantleAPI/Common/bounding_box.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/bounding_box.h rename to include/MantleAPI/Common/bounding_box.h diff --git a/MantleAPI/include/MantleAPI/Common/dimension.h b/include/MantleAPI/Common/dimension.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/dimension.h rename to include/MantleAPI/Common/dimension.h diff --git a/MantleAPI/include/MantleAPI/Common/floating_point_helper.h b/include/MantleAPI/Common/floating_point_helper.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/floating_point_helper.h rename to include/MantleAPI/Common/floating_point_helper.h diff --git a/MantleAPI/include/MantleAPI/Common/i_geometry_helper.h b/include/MantleAPI/Common/i_geometry_helper.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/i_geometry_helper.h rename to include/MantleAPI/Common/i_geometry_helper.h diff --git a/MantleAPI/include/MantleAPI/Common/i_identifiable.h b/include/MantleAPI/Common/i_identifiable.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/i_identifiable.h rename to include/MantleAPI/Common/i_identifiable.h diff --git a/MantleAPI/include/MantleAPI/Common/orientation.h b/include/MantleAPI/Common/orientation.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/orientation.h rename to include/MantleAPI/Common/orientation.h diff --git a/MantleAPI/include/MantleAPI/Common/poly_line.h b/include/MantleAPI/Common/poly_line.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/poly_line.h rename to include/MantleAPI/Common/poly_line.h diff --git a/MantleAPI/include/MantleAPI/Common/pose.h b/include/MantleAPI/Common/pose.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/pose.h rename to include/MantleAPI/Common/pose.h diff --git a/MantleAPI/include/MantleAPI/Common/position.h b/include/MantleAPI/Common/position.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/position.h rename to include/MantleAPI/Common/position.h diff --git a/MantleAPI/include/MantleAPI/Common/spline.h b/include/MantleAPI/Common/spline.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/spline.h rename to include/MantleAPI/Common/spline.h diff --git a/MantleAPI/include/MantleAPI/Common/time_utils.h b/include/MantleAPI/Common/time_utils.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/time_utils.h rename to include/MantleAPI/Common/time_utils.h diff --git a/MantleAPI/include/MantleAPI/Common/trajectory.h b/include/MantleAPI/Common/trajectory.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/trajectory.h rename to include/MantleAPI/Common/trajectory.h diff --git a/MantleAPI/include/MantleAPI/Common/vector.h b/include/MantleAPI/Common/vector.h similarity index 100% rename from MantleAPI/include/MantleAPI/Common/vector.h rename to include/MantleAPI/Common/vector.h diff --git a/MantleAPI/include/MantleAPI/EnvironmentalConditions/road_condition.h b/include/MantleAPI/EnvironmentalConditions/road_condition.h similarity index 100% rename from MantleAPI/include/MantleAPI/EnvironmentalConditions/road_condition.h rename to include/MantleAPI/EnvironmentalConditions/road_condition.h diff --git a/MantleAPI/include/MantleAPI/EnvironmentalConditions/weather.h b/include/MantleAPI/EnvironmentalConditions/weather.h similarity index 100% rename from MantleAPI/include/MantleAPI/EnvironmentalConditions/weather.h rename to include/MantleAPI/EnvironmentalConditions/weather.h diff --git a/MantleAPI/include/MantleAPI/Execution/i_environment.h b/include/MantleAPI/Execution/i_environment.h similarity index 100% rename from MantleAPI/include/MantleAPI/Execution/i_environment.h rename to include/MantleAPI/Execution/i_environment.h diff --git a/MantleAPI/include/MantleAPI/Execution/i_scenario_engine.h b/include/MantleAPI/Execution/i_scenario_engine.h similarity index 100% rename from MantleAPI/include/MantleAPI/Execution/i_scenario_engine.h rename to include/MantleAPI/Execution/i_scenario_engine.h diff --git a/MantleAPI/include/MantleAPI/Execution/scenario_info.h b/include/MantleAPI/Execution/scenario_info.h similarity index 100% rename from MantleAPI/include/MantleAPI/Execution/scenario_info.h rename to include/MantleAPI/Execution/scenario_info.h diff --git a/MantleAPI/include/MantleAPI/Map/i_coord_converter.h b/include/MantleAPI/Map/i_coord_converter.h similarity index 100% rename from MantleAPI/include/MantleAPI/Map/i_coord_converter.h rename to include/MantleAPI/Map/i_coord_converter.h diff --git a/MantleAPI/include/MantleAPI/Map/i_lane_location_query_service.h b/include/MantleAPI/Map/i_lane_location_query_service.h similarity index 100% rename from MantleAPI/include/MantleAPI/Map/i_lane_location_query_service.h rename to include/MantleAPI/Map/i_lane_location_query_service.h diff --git a/MantleAPI/include/MantleAPI/Map/i_route.h b/include/MantleAPI/Map/i_route.h similarity index 100% rename from MantleAPI/include/MantleAPI/Map/i_route.h rename to include/MantleAPI/Map/i_route.h diff --git a/MantleAPI/include/MantleAPI/Map/map_details.h b/include/MantleAPI/Map/map_details.h similarity index 100% rename from MantleAPI/include/MantleAPI/Map/map_details.h rename to include/MantleAPI/Map/map_details.h diff --git a/MantleAPI/include/MantleAPI/Traffic/control_strategy.h b/include/MantleAPI/Traffic/control_strategy.h similarity index 100% rename from MantleAPI/include/MantleAPI/Traffic/control_strategy.h rename to include/MantleAPI/Traffic/control_strategy.h diff --git a/MantleAPI/include/MantleAPI/Traffic/default_routing_behavior.h b/include/MantleAPI/Traffic/default_routing_behavior.h similarity index 100% rename from MantleAPI/include/MantleAPI/Traffic/default_routing_behavior.h rename to include/MantleAPI/Traffic/default_routing_behavior.h diff --git a/MantleAPI/include/MantleAPI/Traffic/entity_helper.h b/include/MantleAPI/Traffic/entity_helper.h similarity index 100% rename from MantleAPI/include/MantleAPI/Traffic/entity_helper.h rename to include/MantleAPI/Traffic/entity_helper.h diff --git a/MantleAPI/include/MantleAPI/Traffic/entity_properties.h b/include/MantleAPI/Traffic/entity_properties.h similarity index 100% rename from MantleAPI/include/MantleAPI/Traffic/entity_properties.h rename to include/MantleAPI/Traffic/entity_properties.h diff --git a/MantleAPI/include/MantleAPI/Traffic/i_controller.h b/include/MantleAPI/Traffic/i_controller.h similarity index 100% rename from MantleAPI/include/MantleAPI/Traffic/i_controller.h rename to include/MantleAPI/Traffic/i_controller.h diff --git a/MantleAPI/include/MantleAPI/Traffic/i_controller_config.h b/include/MantleAPI/Traffic/i_controller_config.h similarity index 100% rename from MantleAPI/include/MantleAPI/Traffic/i_controller_config.h rename to include/MantleAPI/Traffic/i_controller_config.h diff --git a/MantleAPI/include/MantleAPI/Traffic/i_controller_repository.h b/include/MantleAPI/Traffic/i_controller_repository.h similarity index 100% rename from MantleAPI/include/MantleAPI/Traffic/i_controller_repository.h rename to include/MantleAPI/Traffic/i_controller_repository.h diff --git a/MantleAPI/include/MantleAPI/Traffic/i_entity.h b/include/MantleAPI/Traffic/i_entity.h similarity index 100% rename from MantleAPI/include/MantleAPI/Traffic/i_entity.h rename to include/MantleAPI/Traffic/i_entity.h diff --git a/MantleAPI/include/MantleAPI/Traffic/i_entity_repository.h b/include/MantleAPI/Traffic/i_entity_repository.h similarity index 100% rename from MantleAPI/include/MantleAPI/Traffic/i_entity_repository.h rename to include/MantleAPI/Traffic/i_entity_repository.h diff --git a/MantleAPI/include/MantleAPI/Traffic/traffic_light_properties.h b/include/MantleAPI/Traffic/traffic_light_properties.h similarity index 100% rename from MantleAPI/include/MantleAPI/Traffic/traffic_light_properties.h rename to include/MantleAPI/Traffic/traffic_light_properties.h diff --git a/MantleAPI/test/CMakeLists.txt b/test/CMakeLists.txt similarity index 67% rename from MantleAPI/test/CMakeLists.txt rename to test/CMakeLists.txt index 8eacc8e013b45c0e8c20e547a0e7d319d573713e..4b804a245b219dc582cf514bca2d18d2f0b30b82 100644 --- a/MantleAPI/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,13 +16,13 @@ CPMAddPackage( OPTIONS "INSTALL_GTEST OFF" "gtest_force_shared_crt ON" ) -add_executable(ScenarioAPITest) +add_executable(MantleAPITest) -target_sources(ScenarioAPITest PUBLIC interface_test.cpp) +target_sources(MantleAPITest PUBLIC interface_test.cpp) -target_include_directories(ScenarioAPITest PRIVATE ${PROJECT_SOURCE_DIR}) +target_include_directories(MantleAPITest PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/test>) -target_link_libraries(ScenarioAPITest PUBLIC ScenarioAPI::ScenarioAPI GTest::gmock_main) +target_link_libraries(MantleAPITest PUBLIC MantleAPI::MantleAPI GTest::gmock_main) include(GoogleTest) -gtest_discover_tests(ScenarioAPITest) +gtest_discover_tests(MantleAPITest) diff --git a/MantleAPI/test/MantleAPI/Test/test_utils.h b/test/MantleAPI/Test/test_utils.h similarity index 99% rename from MantleAPI/test/MantleAPI/Test/test_utils.h rename to test/MantleAPI/Test/test_utils.h index 7a98ceb7aec5b2d878b1d9f4bdb1a99b4dceace0..dbab7726fa60d94f45aa8e3b5d39a94bb30525aa 100644 --- a/MantleAPI/test/MantleAPI/Test/test_utils.h +++ b/test/MantleAPI/Test/test_utils.h @@ -470,7 +470,6 @@ public: (const std::string& name), (override)); - void SetDateTime(mantle_api::Time date_time) override { std::ignore = date_time; } mantle_api::Time GetDateTime() override { return mantle_api::Time(); } diff --git a/MantleAPI/test/interface_test.cpp b/test/interface_test.cpp similarity index 100% rename from MantleAPI/test/interface_test.cpp rename to test/interface_test.cpp