21 lines
561 B
CMake
21 lines
561 B
CMake
cmake_minimum_required(VERSION 3.22.0)
|
|
|
|
set(PROJECT_NAME zecsy)
|
|
|
|
project(${PROJECT_NAME})
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
find_package(nlohmann_json)
|
|
|
|
add_library(zecsy STATIC zecsy.hpp)
|
|
set_target_properties(zecsy PROPERTIES LINKER_LANGUAGE CXX)
|
|
|
|
#######################################################
|
|
find_package(Catch2 REQUIRED)
|
|
file(GLOB TEST_SRC ./tests/*.cpp ./tests/*.hpp ./tests/*.h)
|
|
add_executable(tests ${TEST_SRC})
|
|
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain zecsy)
|
|
|
|
include(CTest)
|
|
include(Catch)
|
|
catch_discover_tests(tests)
|