1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
open3d_ispc_add_executable(tests)
add_subdirectory(camera)
add_subdirectory(core)
add_subdirectory(data)
add_subdirectory(geometry)
add_subdirectory(io)
add_subdirectory(ml)
add_subdirectory(pipelines)
add_subdirectory(t/geometry)
add_subdirectory(t/io)
add_subdirectory(t/pipelines)
add_subdirectory(test_utility)
add_subdirectory(utility)
add_subdirectory(visualization)
target_sources(tests PRIVATE
Main.cpp
Tests.cpp
)
target_include_directories(tests PRIVATE ".")
# If gpu not available, add "DISABLED_" to the gpu test names
if (BUILD_CUDA_MODULE)
target_compile_definitions(tests PRIVATE GPU_CONDITIONAL_TEST_STR=) # Empty string
else()
target_compile_definitions(tests PRIVATE GPU_CONDITIONAL_TEST_STR=DISABLED_)
endif()
if (WITH_IPPICV)
target_compile_definitions(tests PRIVATE IPP_CONDITIONAL_TEST_STR=) # Empty string (test not disabled)
else()
target_compile_definitions(tests PRIVATE IPP_CONDITIONAL_TEST_STR=DISABLED_)
endif()
target_link_libraries(tests PRIVATE
Open3D::Open3D
Open3D::3rdparty_jsoncpp
Open3D::3rdparty_googletest
Open3D::3rdparty_threads
Open3D::3rdparty_vtk
)
if (TARGET Open3D::3rdparty_openmp)
target_link_libraries(tests PRIVATE
Open3D::3rdparty_openmp
)
endif()
open3d_show_and_abort_on_warning(tests)
open3d_set_global_properties(tests)
if (BUILD_AZURE_KINECT)
# K4A headers are directly used in test. Currently we don't need to link
# the K4A libraries.
target_include_directories(tests SYSTEM PRIVATE ${K4A_INCLUDE_DIR})
endif()
if (BUILD_CUDA_MODULE)
# We still need to explicitly link against CUDA libraries.
# Consider removing dependencies of CUDA headers in the future.
find_package(CUDAToolkit REQUIRED)
target_link_libraries(tests PRIVATE CUDA::cudart)
endif()
|