Skip to content

Commit

Permalink
docs(m2r): reverse args to DefaultRstPath
Browse files Browse the repository at this point in the history
  • Loading branch information
m6w6 committed Sep 15, 2021
1 parent c078856 commit 4b22e28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
find_program(M2R NAMES m2r m2r-3)

function(DefaultRstPath MDFILE RSTFILE_VAR)
function(DefaultRstPath RSTFILE_VAR MDFILE)
string(REGEX REPLACE "\\.md$" ".rst" FILEPATH ${MDFILE})
get_filename_component(FILENAME ${FILEPATH} NAME)
set(${RSTFILE_VAR} "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}" PARENT_SCOPE)
Expand Down Expand Up @@ -33,7 +33,7 @@ if(M2R)
message("-- Checking ChangeLogs, BUGS, etc...")
file(GLOB CHANGELOGS "${CMAKE_SOURCE_DIR}/ChangeLog-*.md")
foreach(CHANGELOG IN LISTS CHANGELOGS)
DefaultRstPath(${CHANGELOG} RESTFILE)
DefaultRstPath(RESTFILE ${CHANGELOG})
UpdateRstFromMd(${RESTFILE} ${CHANGELOG})
endforeach()
UpdateRstFromMd(issues.rst "${CMAKE_SOURCE_DIR}/BUGS.md")
Expand Down

0 comments on commit 4b22e28

Please sign in to comment.