Skip to content

Commit

Permalink
TOOLS: Fix CMake-Doxygen-Windows path issue
Browse files Browse the repository at this point in the history
Fix the CMake-Doxygen-Windows path issue by using find_program to find
 the installed doxygen.
  • Loading branch information
slali87 committed Oct 23, 2024
1 parent 51d52c1 commit 6257eae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,9 @@ jobs:
choco install doxygen.install
choco install graphviz
- name: Create the document
env:
# Add full path on Windows since CMake can not see the doxygen from the PATH
CMD: ${{ runner.os == 'Windows' && '"C:\Program Files\doxygen\bin\doxygen"' || '' }}
run: |
cd ${{ github.event.repository.name }}
cmake -P cmake/doxygen.cmake ${{ env.CMD }}
cmake -P cmake/doxygen.cmake
- name: Check complexity
run: |
cd ${{ github.event.repository.name }}
Expand Down
11 changes: 3 additions & 8 deletions cmake/doxygen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ cmake_minimum_required(VERSION ${version})

message("Run Doxygen")

# Workaround for the CMake-Doxygen-Windows path issue
if(${CMAKE_ARGC} EQUAL 4)
set(doxygen "${CMAKE_ARGV3}")
else()
set(doxygen "doxygen")
endif()
message("Doxygen: ${doxygen}")
execute_process(COMMAND ${doxygen} ${CMAKE_SOURCE_DIR}/Doxyfile
find_program(doxygenPath doxygen REQUIRED)
message("Doxygen: ${doxygenPath}")
execute_process(COMMAND ${doxygenPath} ${CMAKE_SOURCE_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND_ERROR_IS_FATAL ANY)

Expand Down

0 comments on commit 6257eae

Please sign in to comment.