-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
Copy pathCMakeLists.txt
64 lines (52 loc) · 1.9 KB
/
CMakeLists.txt
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
set(SUBSYS_NAME global_tests)
set(SUBSYS_DESC "Point cloud library global unit tests")
PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" OFF)
PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} OPT_DEPS ${OPT_DEPS})
if(NOT build)
return()
endif()
find_package(GTestSource REQUIRED)
include_directories(SYSTEM ${GTEST_INCLUDE_DIRS} ${GTEST_SRC_DIR})
add_library(pcl_gtest STATIC ${GTEST_SRC_DIR}/src/gtest-all.cc)
target_include_directories(pcl_gtest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
enable_testing()
# VS needs -C config to run correct
if(MSVC)
set(PCL_CTEST_ARGUMENTS ${PCL_CTEST_ARGUMENTS} -C $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>)
endif()
# Enables you to disable visualization tests. Used on CI.
if(PCL_DISABLE_VISUALIZATION_TESTS)
list(APPEND EXCLUDE_TESTS visualization)
endif()
# Enables you to disable GPU tests. Used on CI as it has no access to GPU hardware
if(PCL_DISABLE_GPU_TESTS)
list(APPEND EXCLUDE_TESTS gpu)
endif()
#Check if there are any tests to exclude
if(EXCLUDE_TESTS)
message(STATUS "Tests excluded: ${EXCLUDE_TESTS}")
string(REPLACE ";" "|" EXCLUDE_TESTS_REGEX "${EXCLUDE_TESTS}")
set(PCL_CTEST_ARGUMENTS ${PCL_CTEST_ARGUMENTS} -E "(${EXCLUDE_TESTS_REGEX})")
endif()
add_custom_target(tests "${CMAKE_CTEST_COMMAND}" ${PCL_CTEST_ARGUMENTS} -V -T Test VERBATIM)
set_target_properties(tests PROPERTIES FOLDER "Tests")
add_subdirectory(2d)
add_subdirectory(common)
add_subdirectory(features)
add_subdirectory(filters)
add_subdirectory(geometry)
add_subdirectory(gpu)
add_subdirectory(io)
add_subdirectory(kdtree)
add_subdirectory(keypoints)
add_subdirectory(ml)
add_subdirectory(people)
add_subdirectory(octree)
add_subdirectory(outofcore)
add_subdirectory(recognition)
add_subdirectory(registration)
add_subdirectory(search)
add_subdirectory(surface)
add_subdirectory(segmentation)
add_subdirectory(sample_consensus)
add_subdirectory(visualization)