Discussion: http://slicer-devel.65872.n3.nabble.com/Temporary-directory-for-CLI-modules-td4035464.html
Reason to reject initial patch from @ prastawa : Patch Slicer/Slicer#400 will be problematic when the CLI is executed directly without Slicer.
Proposal:
- CLI should always expect the environment variable
SEM_TEMPORARY_DIR to be set
SEM_TEMPORARY_DIR can be set in three different ways:
- Set by reading the value of an other environment variable. This other environment variable would be set configuring SlicerExecutionModel using for example
-DSEM_TEMPORARY_DIR_ENVVAR_NAME:STRING=SLICER_TEMPORARY_DIR
- Set by reading the value of special parameter named
--sem-temporary-dir. If specified, other environment variable would be ignored
- If neither (1) or (2) have been set, temporary directory will be set to the operating system default
- code in charge of reading the other environment variable, or special parameter would be embedded in the CLI thanks to code generated by
GenerateCLP
Discussion: http://slicer-devel.65872.n3.nabble.com/Temporary-directory-for-CLI-modules-td4035464.html
Reason to reject initial patch from @ prastawa : Patch Slicer/Slicer#400 will be problematic when the CLI is executed directly without Slicer.
Proposal:
SEM_TEMPORARY_DIRto be setSEM_TEMPORARY_DIRcan be set in three different ways:-DSEM_TEMPORARY_DIR_ENVVAR_NAME:STRING=SLICER_TEMPORARY_DIR--sem-temporary-dir. If specified, other environment variable would be ignoredGenerateCLP