add coverage
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
cmake_minimum_required(VERSION 4.2.0)
|
||||
project(bar)
|
||||
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
@@ -8,8 +11,8 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -DNDEBUG -Wall -Wextra -Wpedantic -Werror")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -Wall -Wextra -Wpedantic")
|
||||
|
||||
set(CMAKE_C_COMPILER "clang")
|
||||
set(CMAKE_CXX_COMPILER "clang++")
|
||||
set(CMAKE_C_COMPILER "/usr/bin/clang")
|
||||
set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
@@ -59,6 +62,20 @@ add_executable(bar main.cpp)
|
||||
|
||||
target_link_libraries(bar bar_lib ${GTKMM_LIBRARIES} ${LAYERSHELL_LIBRARIES} ${WEBKIT_LIBRARIES} ${CURL_LIBRARIES} nlohmann_json::nlohmann_json)
|
||||
|
||||
# ---- Tests (Catch2) ----
|
||||
find_package(Catch2 3 REQUIRED)
|
||||
|
||||
add_executable(bar_tests
|
||||
tests/string_helper_tests.cpp
|
||||
)
|
||||
target_include_directories(bar_tests PRIVATE
|
||||
include
|
||||
)
|
||||
target_link_libraries(bar_tests PRIVATE Catch2::Catch2WithMain)
|
||||
|
||||
include(Catch)
|
||||
catch_discover_tests(bar_tests)
|
||||
|
||||
# Copy all CSS files in resources/ into build and user config directories
|
||||
file(GLOB RES_CSS_FILES CONFIGURE_DEPENDS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/resources/*.css"
|
||||
|
||||
Reference in New Issue
Block a user