23 lines
560 B
CMake
23 lines
560 B
CMake
enable_testing()
|
|
find_package(GTest REQUIRED)
|
|
include_directories(${GTEST_INCLUDE_DIR})
|
|
|
|
add_executable(runUnitTests
|
|
basic.cpp
|
|
)
|
|
|
|
target_compile_options(runUnitTests PRIVATE -fPIC)
|
|
|
|
target_include_directories(runUnitTests PRIVATE ${CMAKE_SOURCE_DIR})
|
|
target_include_directories(runUnitTests PRIVATE ${Qt${QT_VERSION_MAJOR}_INCLUDE_DIRS})
|
|
target_include_directories(runUnitTests PRIVATE ${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(
|
|
runUnitTests
|
|
GTest::gtest_main
|
|
storage
|
|
)
|
|
|
|
include(GoogleTest)
|
|
gtest_discover_tests(runUnitTests)
|