19 lines
585 B
CMake
19 lines
585 B
CMake
include(FetchContent)
|
|
|
|
FetchContent_Declare(
|
|
googletest
|
|
GIT_REPOSITORY https://github.com/google/googletest.git
|
|
GIT_TAG release-1.11.0
|
|
)
|
|
FetchContent_MakeAvailable(googletest)
|
|
add_library(GTest::GTest INTERFACE IMPORTED)
|
|
target_link_libraries(GTest::GTest INTERFACE gtest_main)
|
|
|
|
|
|
file(GLOB_RECURSE TEST_SRC "tests.cpp" "*.cpp")
|
|
add_executable(Test ${TEST_SRC})
|
|
target_link_libraries(Test PUBLIC J3ML)
|
|
#find_package(GTest REQUIRED)
|
|
target_link_libraries(Test PRIVATE GTest::GTest)
|
|
include_directories("include")
|
|
add_test(NAME "J3MLTestSuite" COMMAND Test) |