[cpp] Fix root project build and dependencies.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user