add CMAKEList tests
This commit is contained in:
parent
14866848dc
commit
b05277eeee
|
|
@ -39,32 +39,31 @@ target_link_libraries(TestJenkins
|
|||
# -----------------------------------------------------------------------------
|
||||
# GoogleTest
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
#include(FetchContent)
|
||||
#
|
||||
#FetchContent_Declare(
|
||||
# googletest
|
||||
# URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip
|
||||
#)
|
||||
#
|
||||
#FetchContent_MakeAvailable(googletest)
|
||||
#
|
||||
#add_executable(UT_Person
|
||||
# tests/UT_Person.cpp
|
||||
#)
|
||||
#
|
||||
#target_link_libraries(UT_Person
|
||||
# PRIVATE
|
||||
# Person
|
||||
# GTest::gtest
|
||||
# GTest::gtest_main
|
||||
#)
|
||||
#
|
||||
#include(GoogleTest)
|
||||
#gtest_discover_tests(UT_Person)
|
||||
#
|
||||
## Optional: place executables in a common output folder
|
||||
#set_target_properties(TestJenkins UT_Person PROPERTIES
|
||||
# RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
#)
|
||||
#
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
googletest
|
||||
URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(googletest)
|
||||
|
||||
add_executable(UT_Person
|
||||
tests/UT_Person.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(UT_Person
|
||||
PRIVATE
|
||||
Person
|
||||
GTest::gtest
|
||||
GTest::gtest_main
|
||||
)
|
||||
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(UT_Person)
|
||||
|
||||
# Optional: place executables in a common output folder
|
||||
set_target_properties(TestJenkins UT_Person PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue