From 951d3233e30bbb32d1633dfcc7c6b45f9d8010ed Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Thu, 30 Jan 2025 13:14:09 +0100 Subject: [PATCH] rename ARGS to SCRIPT_ARGS --- docs/source/usage/project_integration.md | 4 ++-- src/pystencilssfg/cmake/modules/PystencilsSfg.cmake | 6 +++--- tests/integration/cmake_project/CMakeLists.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/usage/project_integration.md b/docs/source/usage/project_integration.md index 491402c..47b1b68 100644 --- a/docs/source/usage/project_integration.md +++ b/docs/source/usage/project_integration.md @@ -117,7 +117,7 @@ with the following signature: ```CMake pystencilssfg_generate_target_sources( <target> SCRIPTS script1.py [script2.py ...] - [ARGS arg1 [arg2 ...]] + [SCRIPT_ARGS arg1 [arg2 ...]] [DEPENDS dependency1.py [dependency2.py...]] [FILE_EXTENSIONS <header-extension> <impl-extension>] [OUTPUT_MODE <standalone|inline|header-only>] @@ -132,7 +132,7 @@ Any changes in the generator scripts, or any listed dependency, will trigger reg The function takes the following options: - `SCRIPTS`: A list of generator scripts - - `ARGS`: A list of custom command line arguments passed to the generator scripts; see [](#custom_cli_args) + - `SCRIPT_ARGS`: A list of custom command line arguments passed to the generator scripts; see [](#custom_cli_args) - `DEPENDS`: A list of dependencies for the generator scripts - `FILE_EXTENSION`: The desired extensions for the generated files - `OUTPUT_MODE`: Sets the output mode of the code generator; see {any}`SfgConfig.output_mode`. diff --git a/src/pystencilssfg/cmake/modules/PystencilsSfg.cmake b/src/pystencilssfg/cmake/modules/PystencilsSfg.cmake index 17a7846..0779599 100644 --- a/src/pystencilssfg/cmake/modules/PystencilsSfg.cmake +++ b/src/pystencilssfg/cmake/modules/PystencilsSfg.cmake @@ -56,7 +56,7 @@ endfunction() function(pystencilssfg_generate_target_sources TARGET) set(options) set(oneValueArgs OUTPUT_MODE CONFIG_MODULE OUTPUT_DIRECTORY) - set(multiValueArgs SCRIPTS DEPENDS FILE_EXTENSIONS ARGS) + set(multiValueArgs SCRIPTS DEPENDS FILE_EXTENSIONS SCRIPT_ARGS) cmake_parse_arguments(_pssfg "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) set(generatorArgs) @@ -107,9 +107,9 @@ function(pystencilssfg_generate_target_sources TARGET) list(APPEND generatorArgs "--sfg-file-extensions=${extensionsString}") endif() - if(DEFINED _pssfg_ARGS) + if(DEFINED _pssfg_SCRIPT_ARGS) # User has provided custom command line arguments - set(userArgs ${_pssfg_ARGS}) + set(userArgs ${_pssfg_SCRIPT_ARGS}) endif() foreach(codegenScript ${_pssfg_SCRIPTS}) diff --git a/tests/integration/cmake_project/CMakeLists.txt b/tests/integration/cmake_project/CMakeLists.txt index 4c15d57..ee7afae 100644 --- a/tests/integration/cmake_project/CMakeLists.txt +++ b/tests/integration/cmake_project/CMakeLists.txt @@ -34,7 +34,7 @@ endif() pystencilssfg_generate_target_sources( TestApp SCRIPTS CliTest.py - ARGS apples bananas unicorns + SCRIPT_ARGS apples bananas unicorns OUTPUT_MODE header-only ) -- GitLab