gnucash-docs stable: Replace list(POP_FRONT) with older iteration technique
John Ralls
jralls at code.gnucash.org
Mon Sep 11 14:38:01 EDT 2023
Updated via https://github.com/Gnucash/gnucash-docs/commit/98d9d72d (commit)
from https://github.com/Gnucash/gnucash-docs/commit/ad6718b5 (commit)
commit 98d9d72d9e9762b11a0d91837dabb160e5c90f23
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Sep 11 11:37:49 2023 -0700
Replace list(POP_FRONT) with older iteration technique
To allow building with CMake < 3.15.
diff --git a/cmake/AddGncDocTargets.cmake b/cmake/AddGncDocTargets.cmake
index cbfdcb64..2abd3d23 100644
--- a/cmake/AddGncDocTargets.cmake
+++ b/cmake/AddGncDocTargets.cmake
@@ -28,9 +28,13 @@ function (add_gnc_doc_targets lang entities figures xslt_files)
set(xslt_epub "${BASE_XSLT_EPUB}")
set(xslt_chm "${BASE_XSLT_CHM}")
set(xslt_filename_list "")
- while(NOT "${xslt_files}" STREQUAL "")
- list(POP_FRONT xslt_files xslt_docfmt xslt_filename)
- list(APPEND xslt_filename_list ${xslt_filename})
+ list(LENGTH xslt_files entries)
+ while(entries)
+ list(GET xslt_files 0 xslt_docfmt)
+ list(GET xslt_files 1 xslt_filename)
+ list(REMOVE_AT xslt_files 0 1)
+ list(LENGTH xslt_files entries)
+ list(APPEND xslt_filename_list ${xslt_filename})
if(xslt_docfmt STREQUAL "html")
set(xslt_html ${xslt_filename})
endif()
Summary of changes:
cmake/AddGncDocTargets.cmake | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
More information about the gnucash-changes
mailing list