added doc and tests for util2d.h

This commit is contained in:
matlabbe
2025-04-25 15:15:59 -07:00
parent d639fcb8e7
commit 982ba35e3d
25 changed files with 4816 additions and 55 deletions
+18
View File
@@ -166,6 +166,23 @@ OPTION(BUILD_APP "Build main application" ON)
OPTION(BUILD_TOOLS "Build tools" ON)
OPTION(BUILD_EXAMPLES "Build examples" ON)
include(CTest)
if(BUILD_TESTING)
# Add GTest using FetchContent
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/tags/v1.16.0.zip
)
FetchContent_GetProperties(googletest)
if(NOT googletest_POPULATED)
FetchContent_Populate(googletest)
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
endif()
include(GoogleTest)
set(TEST_DATA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/data")
endif()
####### DEPENDENCIES #######
IF(MOBILE_BUILD)
option(WITH_QT "Include Qt support" OFF)
@@ -1333,6 +1350,7 @@ MESSAGE(STATUS " CMAKE_INSTALL_LIBDIR = ${CMAKE_INSTALL_LIBDIR}")
MESSAGE(STATUS " BUILD_APP = ${BUILD_APP}")
MESSAGE(STATUS " BUILD_TOOLS = ${BUILD_TOOLS}")
MESSAGE(STATUS " BUILD_EXAMPLES = ${BUILD_EXAMPLES}")
MESSAGE(STATUS " BUILD_TESTING = ${BUILD_TESTING}")
IF(NOT WIN32)
# see comment above for the BUILD_SHARED_LIBS option on Windows
MESSAGE(STATUS " BUILD_SHARED_LIBS = ${BUILD_SHARED_LIBS}")