diff --git a/docs/source/usage/project_integration.md b/docs/source/usage/project_integration.md index 491402cab0544f501ee77447e939b89c606c4987..47b1b6875a502f9c8011df1b51964a85b1ad6281 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 17a7846e6a32761ae0490490acc645e65d376959..0779599a0bd9dd1d90a5a1f1fd5f351f6a2fcde4 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 4c15d570dfa287e861ac710b59a66dc6ae28da88..ee7afae6d5781df607246813f47328bc1d45cfd3 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 )