Skip to content

Commit

Permalink
USE_DOXYGEN
Browse files Browse the repository at this point in the history
  • Loading branch information
John-LittleBearLabs committed Jun 15, 2023
1 parent 5824374 commit 48f1477
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ 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)
message(STATUS "Building for C++${CXX_VERSION}")
else()
message(FATAL_ERROR "Unsupported CXX_VERSION: ${CXX_VERSION}")
endif()

include(cmake/chrome.cmake)
include(cmake/setup.cmake)

Expand Down
16 changes: 9 additions & 7 deletions cmake/setup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48f1477

Please sign in to comment.