Skip to content

also update $CMAKE_PREFIX_PATH and $CMAKE_LIBRARY_PATH in generated module file#3176

Merged
akesandgren merged 5 commits intoeasybuilders:developfrom
Flamefire:improve_make_module_req
Feb 13, 2020
Merged

also update $CMAKE_PREFIX_PATH and $CMAKE_LIBRARY_PATH in generated module file#3176
akesandgren merged 5 commits intoeasybuilders:developfrom
Flamefire:improve_make_module_req

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

Add CMAKE_PREFIX_PATH and CMAKE_LIBRARY_PATH to make_module_req which Fixes #2624

To avoid adding a non-required path to CMAKE_LIBRARY_PATH a check is needed that lib64 is not a symlink to lib. (CMake already searches lib)

This can also be used to avoid duplicate paths in the symlink situation when lib64 and lib would be added while only lib is required.

In extension by changing the iteration to iterate over the combined glob results per key, all duplicate paths can be removed.

This also fixes 2 bugs I found, where the string to list conversion was done after the first usage and the effectively disabled output from dry-run.

Comment thread test/framework/easyblock.py Outdated
Comment thread easybuild/framework/easyblock.py
Comment thread easybuild/framework/easyblock.py
Comment thread test/framework/easyblock.py Outdated
Comment thread easybuild/framework/easyblock.py
Comment thread easybuild/framework/easyblock.py
In dry-run mode a list is assumed, but hoisting happens afterwards
In dry-run installdir usually does not exist so the whole block was skipped
instead of entering the dry-run blocks
Expand all globs and iterate over combined list of paths per key
This allows elimination of duplicate paths and greatly simplified code.
@Flamefire Flamefire force-pushed the improve_make_module_req branch from 2735e04 to 0aea9a4 Compare January 24, 2020 14:49
@Flamefire Flamefire force-pushed the improve_make_module_req branch from 0662ed0 to 8dfbd25 Compare January 24, 2020 15:38
@easybuilders easybuilders deleted a comment from boegelbot Feb 5, 2020
@easybuilders easybuilders deleted a comment from boegelbot Feb 5, 2020
@boegel boegel added this to the next release (4.1.2?) milestone Feb 5, 2020
Copy link
Copy Markdown
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akesandgren
Copy link
Copy Markdown
Contributor

Going in, thanks @Flamefire!

@akesandgren akesandgren merged commit 090f8c1 into easybuilders:develop Feb 13, 2020
@Flamefire Flamefire deleted the improve_make_module_req branch February 13, 2020 11:21
@boegel boegel changed the title Improve make_module_req also update $CMAKE_PREFIX_PATH and $CMAKE_LIBRARY_PATH in generated module file Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modules: Set CMAKE_PREFIX_PATH

4 participants