@@ -28,37 +28,38 @@ if(NOT SKBUILD)
2828 add_subdirectory (examples)
2929 endif ()
3030
31+ include (CTest)
3132 find_package (GTest QUIET )
32- if (GTEST_FOUND)
33- include (CTest)
34- message (STATUS "GTest found. Unit test build: ${BUILD_TESTING} ." )
35- if (BUILD_TESTING)
33+ if (BUILD_TESTING)
34+ if (GTEST_FOUND)
3635 # Tests are dependent on some common code.
3736 if (NOT TARGET pico_common)
3837 add_subdirectory (examples/pico_common)
3938 endif ()
4039
4140 enable_testing ()
4241 add_subdirectory (test /pico_tree)
42+ message (STATUS "GTest found. Building unit tests." )
43+ else ()
44+ message (STATUS "GTest not found. Unit tests will not be build." )
4345 endif ()
44- else ()
45- message (STATUS "GTest not found. Unit tests will not be build." )
4646 endif ()
4747
4848 find_package (Doxygen QUIET )
49- include (CMakeDependentOption )
50- CMAKE_DEPENDENT_OPTION(BUILD_DOCUMENTATION "Build documentation with Doxygen." ON "DOXYGEN_FOUND" OFF )
51- if (BUILD_DOCUMENTATION )
52- set (DOC_TARGET_NAME ${PROJECT_NAME} _doc)
53- # Hide the internal namespace from the documentation.
54- # set(DOXYGEN_EXCLUDE_SYMBOLS "internal")
49+ option (BUILD_DOCS "Build documentation with Doxygen." ON )
50+ if (BUILD_DOCS )
51+ if (DOXYGEN_FOUND )
52+ set (DOC_TARGET_NAME ${PROJECT_NAME} _doc)
53+ # Hide the internal namespace from the documentation.
54+ # set(DOXYGEN_EXCLUDE_SYMBOLS "internal")
5555
56- doxygen_add_docs(
57- ${DOC_TARGET_NAME}
58- src/pico_tree)
56+ doxygen_add_docs(
57+ ${DOC_TARGET_NAME}
58+ src/pico_tree)
5959
60- message (STATUS "Doxygen found. Documentation can be build as: make ${DOC_TARGET_NAME} " )
61- else ()
62- message (STATUS "Doxygen not found. Documentation cannot be build." )
60+ message (STATUS "Doxygen found. Documentation can be build as: make ${DOC_TARGET_NAME} " )
61+ else ()
62+ message (STATUS "Doxygen not found. Documentation cannot be build." )
63+ endif ()
6364 endif ()
6465endif ()
0 commit comments