utempl/CMakeLists.txt

22 lines
755 B
Text
Raw Normal View History

2024-02-22 15:19:01 +00:00
cmake_minimum_required(VERSION 3.27)
project(utempl)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
find_package(fmt REQUIRED)
find_package(Boost 1.84.0 REQUIRED)
2024-02-22 19:41:35 +00:00
set(CMAKE_CXX_STANDART 20)
2024-02-27 18:54:37 +00:00
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CXX_EXTENSIONS NO)
2024-02-22 15:19:01 +00:00
add_library(utempl INTERFACE)
2024-02-27 18:54:37 +00:00
target_link_libraries(utempl INTERFACE fmt::fmt-header-only ${Boost_LIBRARIES})
if(ENABLE_TESTS)
find_package(GTest REQUIRED)
enable_testing()
file(GLOB SOURCES tests/* tests/*/* tests/*/*/*)
add_executable(utempl_tests ${SOURCES})
target_link_libraries(utempl_tests GTest::gtest_main utempl)
set_property(TARGET utempl_tests PROPERTY CXX_STANDARD 20)
include(GoogleTest)
gtest_discover_tests(utempl_tests)
endif()
2024-02-22 15:19:01 +00:00
target_include_directories(utempl INTERFACE include)