Crow/tests/CMakeLists.txt
Gulliver 17034adae5 on all platforms added CROW_FEATURES ssl, compression and needed libs to prerequisites
general tests are now enabled on MSVC, mustachetests disabled due to some strange bug in python script (will be done later)
2024-01-07 16:04:38 +01:00

34 lines
783 B
CMake

cmake_minimum_required(VERSION 3.15)
project(crow_test)
include(${CMAKE_SOURCE_DIR}/cmake/compiler_options.cmake)
enable_testing()
set(TEST_SRCS
unittest.cpp
)
add_executable(unittest ${TEST_SRCS})
target_link_libraries(unittest Crow::Crow)
add_warnings_optimizations(unittest)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
target_link_libraries(unittest log)
endif()
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_target_properties(unittest PROPERTIES COMPILE_FLAGS "--coverage -fprofile-arcs -ftest-coverage")
target_link_libraries(unittest gcov)
endif()
add_subdirectory(template)
add_subdirectory(multi_file)
add_subdirectory(external_definition)
if(NOT MSVC)
if ("ssl" IN_LIST CROW_FEATURES)
add_subdirectory(ssl)
endif()
endif()
add_subdirectory(img)