File: CMakeLists.txt

package info (click to toggle)
open3d 0.9.0%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 101,800 kB
  • sloc: cpp: 65,788; ansic: 6,818; python: 5,593; sh: 906; javascript: 213; makefile: 195; ruby: 52
file content (23 lines) | stat: -rw-r--r-- 759 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

cmake_minimum_required(VERSION 3.0)

include_directories(".")

file(GLOB_RECURSE UNIT_TEST_SOURCE_FILES "*.cpp")

# TODO: consider explicitly listing the files
if (NOT BUILD_AZURE_KINECT)
    set (EXCLUDE_DIR "IO/Sensor")
    foreach (TMP_PATH ${UNIT_TEST_SOURCE_FILES})
        string (FIND ${TMP_PATH} ${EXCLUDE_DIR} EXCLUDE_DIR_FOUND)
        if (NOT ${EXCLUDE_DIR_FOUND} EQUAL -1)
            list (REMOVE_ITEM UNIT_TEST_SOURCE_FILES ${TMP_PATH})
        endif ()
    endforeach(TMP_PATH)
endif()

add_executable(unitTests ${UNIT_TEST_SOURCE_FILES})
add_definitions(-DTEST_DATA_DIR="${PROJECT_SOURCE_DIR}/examples/TestData")

target_link_libraries(unitTests PRIVATE ${CMAKE_PROJECT_NAME} LibDepends 3rdparty::googletest)
ShowAndAbortOnWarning(unitTests)