commontk / CTK

A set of common support code for medical imaging, surgical navigation, and related purposes.
https://commontk.org
Apache License 2.0
827 stars 481 forks source link

ENH: Streamline test execution setting launch environment #1168

Closed jcfr closed 5 months ago

jcfr commented 5 months ago

Update "simple_test" and "simple_test_with_data" macros by setting the ENVIRONMENT_MODIFICATION test property with the CTK_TEST_LAUNCH_BUILD_ENVIRONMENT_MODIFICATION variable.

The CTK_TEST_LAUNCH_BUILD_ENVIRONMENT_MODIFICATION variable list the environment modifications for each environment variables PATH, LD_LIBRARY_PATH and/or DYLD_LIBRARY_PATH based on the list of paths and library paths associated with dependencies. This includes Qt and any enabled external projects.

To streamline the process of gathering external project-specific "library paths" and "paths", these are now individually defined within each external project and linked to a label associated with the corresponding mark_as_superbuild() call.

Related:


Prior attempt at setting the ENVIRONMENT test property failed on windows as there was no way of defining the PATH variable. The use of ; (or even the $<SEMICOLON> generator expression) did not allow to set PATH with multiple values.