feat: added woodpecker config

Reviewed-on: #1
Co-authored-by: Tobias Schmidl <tobias@schmidl.dev>
Co-committed-by: Tobias Schmidl <tobias@schmidl.dev>
This commit is contained in:
Tobias Schmidl 2023-10-06 07:10:26 +02:00
parent 70dcc822fd
commit 2c822ce773
15 changed files with 129 additions and 129 deletions

View file

@ -29,12 +29,7 @@ endif()
# ---- Create binary ----
file(
GLOB
sources
CONFIGURE_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp
)
file(GLOB sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp)
add_executable(${PROJECT_NAME} ${sources})
target_link_libraries(
${PROJECT_NAME}
@ -46,13 +41,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)
# enable compiler warnings
if(NOT TEST_INSTALLED_VERSION)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(
Glimpses
PUBLIC -Wall
-Wpedantic
-Wextra
-Werror
)
target_compile_options(Glimpses PUBLIC -Wall -Wpedantic -Wextra -Werror)
elseif(MSVC)
target_compile_options(Glimpses PUBLIC /W4 /WX)
target_compile_definitions(${PROJECT_NAME} PUBLIC DOCTEST_CONFIG_USE_STD_HEADERS)
@ -63,25 +52,14 @@ endif()
enable_testing()
# Note: doctest and similar testing frameworks can automatically configure CMake tests. For other testing frameworks add
# the tests target instead: add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})
# Note: doctest and similar testing frameworks can automatically configure CMake tests. For other testing frameworks add the tests target
# instead: add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})
# include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake) doctest_discover_tests(${PROJECT_NAME})
# ---- code coverage ----
if(ENABLE_TEST_COVERAGE)
target_compile_options(
Glimpses
PUBLIC -O0
-g
-fprofile-arcs
-ftest-coverage
)
target_link_options(
Glimpses
PUBLIC
-fprofile-arcs
-ftest-coverage
)
target_compile_options(Glimpses PUBLIC -O0 -g -fprofile-arcs -ftest-coverage)
target_link_options(Glimpses PUBLIC -fprofile-arcs -ftest-coverage)
endif()