-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add Tribol to codevelop build #985
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
a1b0b83
add tribol directory and submodule
ebchin 2f14451
initial working codevelop build
ebchin 8472094
Merge branch 'feature/chin23/contact_mechanics' into feature/chin23/t…
ebchin 60022f1
get rid of examples and tests
ebchin 90626d6
clean up export set tribol-targets
ebchin d0f3af3
only add redecomp if its built
ebchin 6924465
Merge branch 'feature/chin23/contact_mechanics' into feature/chin23/t…
ebchin 63c94c1
fix url; sync tribol commits
ebchin 349b760
Merge branch 'feature/chin23/contact_mechanics' into feature/chin23/t…
ebchin bd3b3d8
Merge branch 'develop' into feature/chin23/tribol_submodule
ebchin 6aa0a2f
update tribol submodule
ebchin 3bff546
Merge branch 'feature/chin23/contact_mechanics' into feature/chin23/t…
ebchin a42579f
get rid of unneeded tribol targets
ebchin a1668e3
Merge branch 'feature/chin23/contact_mechanics' into feature/chin23/t…
ebchin 91a347e
move method to cpp file
ebchin e26e443
Merge branch 'feature/chin23/contact_mechanics' into feature/chin23/t…
ebchin b3f9fde
Merge branch 'develop' into feature/chin23/tribol_submodule
ebchin a2fb383
update tribol repo
ebchin 79ea0fe
turn off fortran for tribol
ebchin d8adbe5
Merge branch 'develop' into feature/chin23/tribol_submodule
jamiebramwell bd26dc2
add a note to get rid of tribols config header code
ebchin 5976b5e
Merge branch 'develop' into feature/chin23/tribol_submodule
ebchin e0d5f97
Merge branch 'develop' into feature/chin23/tribol_submodule
ebchin 5d79185
Merge branch 'develop' into feature/chin23/tribol_submodule
jamiebramwell 020f77a
Merge branch 'develop' into feature/chin23/tribol_submodule
ebchin 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -405,31 +405,77 @@ if (NOT SERAC_THIRD_PARTY_LIBRARIES_FOUND) | |
#------------------------------------------------------------------------------ | ||
# Tribol | ||
#------------------------------------------------------------------------------ | ||
if(TRIBOL_DIR) | ||
serac_assert_is_directory(VARIABLE_NAME TRIBOL_DIR) | ||
if (NOT SERAC_ENABLE_CODEVELOP) | ||
if(TRIBOL_DIR) | ||
serac_assert_is_directory(VARIABLE_NAME TRIBOL_DIR) | ||
|
||
find_package(tribol REQUIRED | ||
NO_DEFAULT_PATH | ||
PATHS ${TRIBOL_DIR}/lib/cmake) | ||
|
||
find_package(tribol REQUIRED | ||
NO_DEFAULT_PATH | ||
PATHS ${TRIBOL_DIR}/lib/cmake) | ||
if(TARGET tribol) | ||
message(STATUS "Tribol CMake exported library loaded: tribol") | ||
else() | ||
message(FATAL_ERROR "Could not load Tribol CMake exported library: tribol") | ||
endif() | ||
|
||
if(TARGET tribol) | ||
message(STATUS "Tribol CMake exported library loaded: tribol") | ||
# Set include dir to system | ||
set(TRIBOL_INCLUDE_DIR ${TRIBOL_DIR}/include) | ||
set_property(TARGET tribol | ||
APPEND PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES | ||
${TRIBOL_INCLUDE_DIR}) | ||
set(TRIBOL_FOUND ON) | ||
else() | ||
message(FATAL_ERROR "Could not load Tribol CMake exported library: tribol") | ||
set(TRIBOL_FOUND OFF) | ||
endif() | ||
|
||
# Set include dir to system | ||
set(TRIBOL_INCLUDE_DIR ${TRIBOL_DIR}/include) | ||
set_property(TARGET tribol | ||
APPEND PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES | ||
${TRIBOL_INCLUDE_DIR}) | ||
|
||
set(TRIBOL_FOUND ON) | ||
|
||
message(STATUS "Tribol support is " ${TRIBOL_FOUND}) | ||
else() | ||
set(TRIBOL_FOUND OFF) | ||
set(ENABLE_FORTRAN OFF CACHE BOOL "" FORCE) | ||
# Otherwise we use the submodule | ||
message(STATUS "Using Tribol submodule") | ||
set(BUILD_REDECOMP ${ENABLE_MPI} CACHE BOOL "") | ||
set(TRIBOL_USE_MPI ${ENABLE_MPI} CACHE BOOL "") | ||
set(TRIBOL_ENABLE_TESTS OFF CACHE BOOL "") | ||
set(TRIBOL_ENABLE_EXAMPLES OFF CACHE BOOL "") | ||
set(TRIBOL_ENABLE_DOCS OFF CACHE BOOL "") | ||
if(${PROJECT_NAME} STREQUAL "smith") | ||
include(serac/tribol/cmake/TribolMacros.cmake) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/serac/tribol/src ${CMAKE_BINARY_DIR}/tribol) | ||
# NOTE: This needs to be removed when Tribol PR #45 is merged and serac is updated | ||
tribol_configure_file(${PROJECT_SOURCE_DIR}/serac/tribol/src/tribol/config.hpp.in | ||
${PROJECT_BINARY_DIR}/serac/tribol/include/tribol/config.hpp) | ||
else() | ||
include(tribol/cmake/TribolMacros.cmake) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/tribol/src ${CMAKE_BINARY_DIR}/tribol) | ||
# NOTE: This needs to be removed when Tribol PR #45 is merged and serac is updated | ||
tribol_configure_file(${PROJECT_SOURCE_DIR}/tribol/src/tribol/config.hpp.in | ||
${PROJECT_BINARY_DIR}/tribol/include/tribol/config.hpp) | ||
endif() | ||
|
||
target_include_directories(redecomp PUBLIC | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/tribol/src> | ||
) | ||
|
||
target_include_directories(tribol PUBLIC | ||
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 really wish I could figure out why these includes disappear. Axom does the same thing and I can't for the life of my figure out why. |
||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/tribol/src> | ||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/tribol/include> | ||
$<INSTALL_INTERFACE:include> | ||
) | ||
|
||
set(tribol_depends mfem) | ||
blt_list_append(TO tribol_depends ELEMENTS mpi IF ENABLE_MPI) | ||
install(TARGETS ${tribol_depends} | ||
EXPORT tribol-targets | ||
DESTINATION lib | ||
) | ||
|
||
set(tribol_exported_targets tribol) | ||
blt_list_append(TO tribol_exported_targets ELEMENTS redecomp IF BUILD_REDECOMP) | ||
|
||
set(TRIBOL_FOUND TRUE CACHE BOOL "" FORCE) | ||
set(ENABLE_FORTRAN ON CACHE BOOL "" FORCE) | ||
endif() | ||
|
||
message(STATUS "Tribol support is " ${TRIBOL_FOUND}) | ||
|
||
#------------------------------------------------------------------------------ | ||
# PETSC | ||
|
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.
Why is tribol not configuring this file itself?
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.
It will when LLNL/Tribol#45 is merged in. Added a note here as a reminder to get rid of this when we update serac's Tribol again.