From fde03d1d63fce4aa10bd7e28ded746d7df6dbf5b Mon Sep 17 00:00:00 2001 From: John Turpish Date: Thu, 15 Jun 2023 13:47:00 -0600 Subject: [PATCH] USE_DOXYGEN --- .github/workflows/library.yml | 3 ++- CMakeLists.txt | 2 ++ cmake/setup.cmake | 16 +++++++++------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/library.yml b/.github/workflows/library.yml index 3082af43..d3219764 100644 --- a/.github/workflows/library.yml +++ b/.github/workflows/library.yml @@ -145,7 +145,8 @@ jobs: -S . \ -B build \ -D CMAKE_INSTALL_PREFIX=`pwd`/ipfs-client-dev \ - -D CMAKE_BUILD_TYPE=${{ matrix.config.build_type }} + -D CMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \ + -D USE_DOXYGEN=OFF - name: Build shell: bash run: cmake --build build --config ${{ matrix.config.build_type }} --target package diff --git a/CMakeLists.txt b/CMakeLists.txt index e574ccc3..b0dd34c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ set(DEPOT_TOOLS_DIRECTORY "${default_dt}" CACHE PATH "Where to find depot_tools, e.g. DEPOT_TOOLS_DIRECTORY/gn.py should exist. Setting this to DETECT_FROM_PATH implies the directory is in your PATH and always will be." ) set(TEST_BY_DEFAULT FALSE CACHE BOOL "Update unit tests as part of the 'all' default target.") +set(USE_DOXYGEN TRUE CACHE BOOL "If we should attempt to use Doxygen to generate documentation.") #End of user-configuration cache variables. if(CXX_VERSION GREATER_EQUAL 17) @@ -32,6 +33,7 @@ if(CXX_VERSION GREATER_EQUAL 17) else() message(FATAL_ERROR "Unsupported CXX_VERSION: ${CXX_VERSION}") endif() + include(cmake/chrome.cmake) include(cmake/setup.cmake) diff --git a/cmake/setup.cmake b/cmake/setup.cmake index a23e286f..251ca563 100644 --- a/cmake/setup.cmake +++ b/cmake/setup.cmake @@ -39,13 +39,15 @@ else() "${CMAKE_CURRENT_LIST_DIR}/conanfile.txt" "${CMAKE_CURRENT_BINARY_DIR}/conanfile.txt" ) - find_package(Doxygen) - if (NOT DOXYGEN_FOUND) - message(WARNING "Will attempt to get doxygen from Conan, which doesn't work on some systems like Github's ubuntu-latest runner.") - file(APPEND - "${CMAKE_CURRENT_BINARY_DIR}/conanfile.txt" - doxygen/1.9.4 - ) + if(USE_DOXYGEN) + find_package(Doxygen) + if (NOT DOXYGEN_FOUND) + message(WARNING "Will attempt to get doxygen from Conan, which doesn't work on some systems like Github's ubuntu-latest runner.") + file(APPEND + "${CMAKE_CURRENT_BINARY_DIR}/conanfile.txt" + doxygen/1.9.4 + ) + endif() endif() execute_process( COMMAND conan install ${CMAKE_CURRENT_BINARY_DIR} --output-folder=${CMAKE_CURRENT_BINARY_DIR} --build=missing --settings build_type=${CMAKE_BUILD_TYPE} --generator CMakeDeps