34 lines
771 B
CMake
34 lines
771 B
CMake
|
cmake_minimum_required(VERSION 3.18)
|
||
|
|
||
|
set(CMAKE_TOOLCHAIN_FILE "/opt/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||
|
CACHE STRING "Vcpkg toolchain file")
|
||
|
|
||
|
project(protobook LANGUAGES CXX VERSION 0.0.1)
|
||
|
|
||
|
|
||
|
find_package(Catch2 REQUIRED)
|
||
|
# Disable automatic CMake build targets like: ContinuousBuild, Experimental, etc..
|
||
|
# https://stackoverflow.com/questions/56089330/cmake-creates-lots-of-targets-i-didnt-specify
|
||
|
set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
|
||
|
include(CTest)
|
||
|
include(Catch)
|
||
|
|
||
|
#add_subdirectory(testing)
|
||
|
add_subdirectory(addressbook)
|
||
|
|
||
|
add_executable(writer
|
||
|
writer.cpp
|
||
|
)
|
||
|
target_link_libraries(writer
|
||
|
PRIVATE
|
||
|
addressbook
|
||
|
)
|
||
|
|
||
|
add_executable(reader
|
||
|
reader.cpp
|
||
|
)
|
||
|
target_link_libraries(reader
|
||
|
PRIVATE
|
||
|
addressbook
|
||
|
)
|