Skip to content

Conversation

@kgerheiser
Copy link
Contributor

Instead of hardcoding lib, make it a templated value and at module installation detect CMAKE_INSTALL_LIBDIR and fill it into the module using configure_file.

@kgerheiser kgerheiser requested a review from aerorahul February 8, 2021 17:46
@aerorahul
Copy link
Contributor

I like the changes.
But, I have a question.
I see you are relying on cmake to obtain CMAKE_INSTALL_LIBDIR and install the modulefile.
What do you do when cmake itself is being built and deployed as a module?

Check if building MPI, compiler, or CMake and if so don't run configure_file on module

Move CMake script into generate file
@kgerheiser
Copy link
Contributor Author

@aerorahul I added a check if building cmake, gnu, or mpi (the first three things built) and for those just copy the module over, otherwise CMake is available.

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

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

looks good.
You will need to bring you branch up to date before CI and merge.


# Install the module with configure_file, replacing ${CMAKE_INSTALL_LIBDIR} (and potentially other variables)
# with the actual value for that system
$SUDO cmake -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} \
Copy link
Contributor

Choose a reason for hiding this comment

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

This is good.
I would just note that we will need more template variables e.g. PYTHON_VERSION in bufr.lua.
We can address that in a later PR.

@aerorahul aerorahul merged commit 7d6dc1a into NOAA-EMC:develop Feb 10, 2021
@kgerheiser kgerheiser deleted the bugfix/module-cmake-install-dir branch February 23, 2022 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants