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")