Replaced .gitmodules with fetch_content
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
This commit is contained in:
parent
4869d94f8a
commit
50ffbbc01a
10 changed files with 83 additions and 107 deletions
|
|
@ -1,15 +1,9 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#####################################################
|
||||
#################### GETEST #######################
|
||||
#################### GOOGLETEST #####################
|
||||
#####################################################
|
||||
enable_testing()
|
||||
if(KOMPUTE_OPT_REPO_SUBMODULE_BUILD)
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/external/googletest EXCLUDE_FROM_ALL
|
||||
${CMAKE_CURRENT_BINARY_DIR}/kompute_googletest)
|
||||
else()
|
||||
find_package(GTest CONFIG REQUIRED)
|
||||
endif()
|
||||
|
||||
file(GLOB test_kompute_CPP
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
|
||||
|
|
@ -23,20 +17,7 @@ target_include_directories(
|
|||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/compiled_shaders_include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/utils>
|
||||
)
|
||||
|
||||
if(KOMPUTE_OPT_REPO_SUBMODULE_BUILD)
|
||||
target_include_directories(
|
||||
test_kompute PRIVATE
|
||||
${gtest_SOURCE_DIR}/include)
|
||||
|
||||
target_link_libraries(test_kompute
|
||||
gtest_main)
|
||||
else()
|
||||
target_link_libraries(test_kompute
|
||||
GTest::gtest)
|
||||
endif()
|
||||
|
||||
target_link_libraries(test_kompute kompute)
|
||||
target_link_libraries(test_kompute kompute GTest::GTest)
|
||||
|
||||
add_test(NAME test_kompute COMMAND test_kompute)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue