From 1f18499228ebb5830ad947e4a326878755aee998 Mon Sep 17 00:00:00 2001 From: Pcornat Date: Wed, 30 Oct 2024 17:04:49 +0100 Subject: [PATCH] Adding BillySheet as a library --- CMakeLists.txt | 4 ++-- Unit testing/CMakeLists.txt | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eca249a..a6e059b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,8 +77,6 @@ if (${ENABLE_COVERAGE}) list(APPEND LINKER_FLAGS gcov) endif () -add_subdirectory("Unit testing") - add_library(BillySheet SHARED ${SOURCES}) target_include_directories(BillySheet PRIVATE include include/imgui external/ImFileDialog) @@ -117,3 +115,5 @@ target_link_libraries(BillySheet glfw nlohmann_json::nlohmann_json ${LINKER_FLAGS} ) + +add_subdirectory("Unit testing") diff --git a/Unit testing/CMakeLists.txt b/Unit testing/CMakeLists.txt index d8086de..554d3fd 100644 --- a/Unit testing/CMakeLists.txt +++ b/Unit testing/CMakeLists.txt @@ -6,7 +6,6 @@ include(../external/catch2/extras/Catch.cmake) add_executable(UnitTest adummy.cpp characteristics_tests.cpp - ../src/billy_objects.cpp billy_objects_tests.cpp ) @@ -19,9 +18,9 @@ set_target_properties(Catch2 UnitTest svector PROPERTIES ) target_include_directories(UnitTest PRIVATE ${CMAKE_SOURCE_DIR}/include) target_compile_definitions(UnitTest PRIVATE ${DEF_COMP}) -target_compile_options(UnitTest PRIVATE ${COMPILE_FLAGS}) +target_compile_options(UnitTest PRIVATE ${COMPILE_FLAGS} -fdiagnostics-all-candidates) target_link_options(UnitTest PRIVATE ${LINKER_OPTIONS}) -target_link_libraries(UnitTest ${LINKER_FLAGS} spdlog::spdlog_header_only Catch2::Catch2WithMain nlohmann_json::nlohmann_json svector::svector) +target_link_libraries(UnitTest ${LINKER_FLAGS} spdlog::spdlog_header_only Catch2::Catch2WithMain nlohmann_json::nlohmann_json svector::svector BillySheet) enable_testing() catch_discover_tests(UnitTest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} REPORTER junit OUTPUT_DIR ${CMAKE_SOURCE_DIR} OUTPUT_PREFIX cppspec- OUTPUT_SUFFIX .xml)