From 4b22e28cd3cf2713b3345940eb709789137cbcf7 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 15 Sep 2021 13:42:40 +0200 Subject: [PATCH] docs(m2r): reverse args to DefaultRstPath --- docs/source/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/CMakeLists.txt b/docs/source/CMakeLists.txt index 6b84c94e..c783484c 100644 --- a/docs/source/CMakeLists.txt +++ b/docs/source/CMakeLists.txt @@ -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) @@ -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") -- 2.30.2