34 lines
617 B
CMake
34 lines
617 B
CMake
cmake_minimum_required (VERSION 3.8)
|
|
|
|
enable_testing()
|
|
|
|
add_executable(
|
|
AppTest
|
|
AllTests.cpp
|
|
MathTest.cpp
|
|
AlgoTest.cpp
|
|
Helpers.hh
|
|
MockAlgorithm.hh
|
|
)
|
|
|
|
|
|
target_include_directories(App PUBLIC "${CMAKE_SOURCE_DIR}/AppLib/include/AppLib")
|
|
|
|
find_package(GTest CONFIG REQUIRED)
|
|
target_link_libraries(AppTest PRIVATE
|
|
GTest::gtest
|
|
GTest::gtest_main
|
|
GTest::gmock
|
|
GTest::gmock_main
|
|
AppLib
|
|
)
|
|
|
|
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
|
set_property(TARGET AppLib PROPERTY CXX_STANDARD 20)
|
|
endif()
|
|
|
|
include(GoogleTest)
|
|
gtest_discover_tests(AppTest)
|
|
|
|
add_test(AppTest AppTest)
|
|
# add_test(MathTest AppTest) |