[cpp] Fix root project build and dependencies.

This commit is contained in:
2025-07-05 13:38:47 -04:00
parent edde77b9c3
commit 20efb62615
83 changed files with 255 additions and 137 deletions

View File

@@ -14,18 +14,22 @@ project(
DESCRIPTION "Practice project for learning Catch2"
LANGUAGES CXX
)
message(STATUS "[Klips] Configuring example: ${PROJECT_NAME}")
add_compile_options(-Wall)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
Include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.1
GIT_TAG v3.4.0
)
FetchContent_MakeAvailable(Catch2)
add_subdirectory(src)
add_subdirectory(test)
add_library(klips SHARED src/klips.cpp)
target_include_directories(klips PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
add_executable(test_klips src/test_klips.cpp)
target_link_libraries(test_klips PUBLIC Catch2::Catch2WithMain klips)