Skip to content
Snippets Groups Projects
Commit 951d3233 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

rename ARGS to SCRIPT_ARGS

parent 460b48fa
No related branches found
No related tags found
1 merge request!16CMake Interaction Update
Pipeline #73097 passed
......@@ -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`.
......
......@@ -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})
......
......@@ -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
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment