Skip to content

Conversation

@kgerheiser
Copy link

@rmontuoro I figured out a way to make our FindNetCDF take precedence, and I think it's a better approach than directly passing nc-config flags.

cmake .. \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_MODULE_PATH="${CMAKEMODULES_ROOT}/Modules;${ESMA_CMAKE_ROOT}" \
-DCMAKE_MODULE_PATH="${ESMA_CMAKE_ROOT};${CMAKEMODULES_ROOT}/Modules;${ECBUILD_ROOT}/share/ecbuild/cmake" \
Copy link
Owner

Choose a reason for hiding this comment

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

Builds fine on Hera

Choose a reason for hiding this comment

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

I don't think it is a good idea to send the esma cmake and ecbuild from here. I am sure it is explicitly included in mapl.

Copy link
Owner

Choose a reason for hiding this comment

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

ESMA_CMAKE_ROOT is required to find ESMA_cmake. The esma.cmake script (included in MAPL/CmakeLists.txt) uses find_package(ecbuild) to load ecBuild.

Copy link
Author

Choose a reason for hiding this comment

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

ecbuild is handled internally, but if you set it here then it doesn't get set again when ecbuild is loaded and override FindNetCDF.

@rmontuoro rmontuoro merged commit 06ae29d into rmontuoro:feature/gocart Jun 17, 2021
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.

3 participants