-
Notifications
You must be signed in to change notification settings - Fork 65
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
Open
bam241
wants to merge
13
commits into
svalinn:develop
Choose a base branch
from
bam241:auto_moab
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+88
−3
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
99222f6
first attempt to auto-install MOAB
bam241 fa05e11
Update cmake/FindMOAB.cmake
bam241 21343f9
Update cmake/FindMOAB.cmake
bam241 45feb89
reformating + changelog + tests
bam241 615b955
add missing indent
bam241 26abadb
generalyze shared lib extention
bam241 8c05ac7
temporary change to master
bam241 24ed342
back to 5.5.1
bam241 85564ea
adding DDL_INSTALL_DEPS as an option with default to OFF
bam241 17d11d1
keeping jon changes
bam241 5fe643b
trying MOAB master
bam241 92a2a0e
reverting to 5.5.1 as default version for MOAB
bam241 b86a8a6
cleaning variable name
bam241 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
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}") | ||
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 | ||
-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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 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 comment
The reason will be displayed to describe this comment to others. Learn more.
I have no experience about
scikit-build-core
, maybe we shall fix it, if the problem occurs ?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 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 comment
The 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 comment
The 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 comment
The 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