-
Notifications
You must be signed in to change notification settings - Fork 66
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
Automatic download and build of MOAB #969
base: develop
Are you sure you want to change the base?
Changes from 7 commits
99222f6
fa05e11
21343f9
45feb89
615b955
26abadb
8c05ac7
24ed342
85564ea
17d11d1
5fe643b
92a2a0e
b86a8a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# this Macro sets up the download and build of MOAB using ExternalProject | ||
# few tweak are done in src/dagmc/CMakeLists.txt and src/PyNE/CMakelists.txt | ||
# to make sure that MOAB is built before DAGMC. | ||
MACRO (moab_pull_make moab_version) | ||
message(STATUS "MOAB will be downloaded and built") | ||
include(ExternalProject) | ||
message("HDF5_ROOT: ${HDF5_ROOT}") | ||
SET(MOAB_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/moab") | ||
bam241 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
set(MOAB_ROOT "${CMAKE_BINARY_DIR}/moab") | ||
set(MOAB_INCLUDE_DIRS "${MOAB_INSTALL_PREFIX}/include") | ||
set(MOAB_LIBRARY_DIRS "${MOAB_INSTALL_PREFIX}/lib") | ||
message("MOAB_LIBRARY_DIRS: ${MOAB_LIBRARY_DIRS}") | ||
MEsSAGE("CMAKE_SHARED_LIBRARY_SUFFIX: ${CMAKE_SHARED_LIBRARY_SUFFIX}") | ||
bam241 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
set(MOAB_LIBRARIES_SHARED "") | ||
ExternalProject_Add(MOAB_ep | ||
PREFIX ${MOAB_ROOT} | ||
GIT_REPOSITORY https://bitbucket.org/fathomteam/moab.git | ||
GIT_TAG ${moab_version} | ||
CMAKE_ARGS | ||
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> | ||
-DBUILD_SHARED_LIBS:BOOL=ON | ||
-DENABLE_HDF5:BOOL=ON | ||
-DHDF5_ROOT:PATH=${HDF5_ROOT} | ||
-DCMAKE_INSTALL_RPATH=${HDF5_ROOT}/lib:${MOAB_INSTALL_PREFIX}/lib | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method may work here for now, but may create trouble while working with scikit-build-core depended project. However, I am not sure here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no experience about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe MOAB master branch now has scikit-build core while version 5.5.1 does not. Perhaps changing the moab version to master would provide a quick way of checking if this continues to work
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trying it now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to mention @bam241 tried this with the master branch of MOAB (which has scikit build core) and reported that it works There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. have a doubt about what I did, I'll try one more time |
||
-DENABLE_BLASLAPACK:BOOL=OFF | ||
-DENABLE_FORTRAN:BOOL=OFF | ||
-DENABLE_PYMOAB:BOOL=OFF | ||
DOWNLOAD_EXTRACT_TIMESTAMP true | ||
BUILD_BYPRODUCTS "${MOAB_LIBRARY_DIRS}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*" | ||
INSTALL_DIR "${MOAB_INSTALL_PREFIX}" | ||
) | ||
# Setup a interface library for MOAB based on ExternalProoject MOAB_EP | ||
add_library(MOAB INTERFACE) | ||
|
||
target_include_directories(MOAB SYSTEM INTERFACE ${MOAB_INCLUDE_DIRS}) | ||
target_link_libraries(MOAB INTERFACE ${MOAB_LIBRARY_DIRS}/libMOAB${CMAKE_SHARED_LIBRARY_SUFFIX}) | ||
add_dependencies(MOAB MOAB_ep) | ||
install(TARGETS MOAB LIBRARY DESTINATION ${MOAB_LIBRARY_DIRS} | ||
PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR}) | ||
include_directories(${MOAB_INCLUDE_DIRS}) | ||
link_directories(${MOAB_LIBRARY_DIRS}) | ||
find_package(Eigen3 REQUIRED NO_MODULE) | ||
include_directories(${EIGEN3_INCLUDE_DIRS}) | ||
|
||
ENDMACRO(moab_pull_make) |
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.
What is the use of it?
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 is like Enable Download MOAB or Double Down?
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 only enables MOAB Download, otherwise everything work as it used to.
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.
I don't have a strong opinion about the name of the variable,
but eventually one might want to include
Embree
andDD
the same way...if your question is about the addition into the matrix, I needed it to allow the CI to test for this kind of build...
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 seems to pass, I'll revert the change