-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fypp robustness #53
base: develop
Are you sure you want to change the base?
Fypp robustness #53
Conversation
* Without this export, in some cases wrong python interpreter is found.
* remove superfluous arguments, and remove unnecessary fckit-eval script leading to much shorter command string * without this, custom_command string length problems can occur
|
@@ -18,7 +18,7 @@ else() | |||
elseif( @HAVE_FCKIT_VENV@ ) | |||
set( _fckit_eval_script ${fckit_BASE_DIR}/libexec/fckit-eval.sh ) | |||
set( FCKIT_VENV_EXE ${fckit_BASE_DIR}/@rel_venv_exe_path@ ) | |||
set( FYPP ${_fckit_eval_script} ${FCKIT_VENV_EXE} -m fypp ) | |||
set( FYPP ${FCKIT_VENV_EXE} -m fypp ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fckit_eval_script is necessary, because it allowed to exclude some arguments:
#23
list( APPEND _args "$<$<BOOL:${prop}>:-D $<JOIN:${prop}, -D >>" ) | ||
endforeach() | ||
endif() | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is required to automatically give the fypp preprocessor access to the target compile definitions and target include directories.
What is the issue w.r.t. robustness here?
@@ -192,7 +171,7 @@ function( fckit_target_preprocess_fypp _PAR_TARGET ) | |||
|
|||
set( options NO_LINE_NUMBERING ) | |||
set( single_value_args "" ) | |||
set( multi_value_args FYPP_ARGS FYPP_ARGS_EXCLUDE DEPENDS ) | |||
set( multi_value_args FYPP_ARGS FYPP_ARGS_EXCLUDE DEPENDS INCLUDEDIRS ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with ecbuild_add_executable
we can name this INCLUDES
and also add DEFINITIONS
[ INCLUDES <path1> [<path2> ...] ]
[ DEFINITIONS <definition1> [<definition2> ...] ]
@@ -43,7 +43,7 @@ cmake_policy( SET CMP0064 NEW ) # Recognize ``TEST`` as operator for the ``if()` | |||
|
|||
set( options ) | |||
set( single_value_args TARGET ) | |||
set( multi_value_args ) | |||
set( multi_value_args INCLUDEDIRS ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with ecbuild_add_test we should use INCLUDES
, and they should already be part of the signature of add_fctest which just extends ecbuild_add_test
.
Approach that allowed to get around path length and venv handling issues in easybuild-based installation of fckit.