Skip to content

Fix warnings, move to c++17, consistent include guards, clean up (some) includes #147

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

Draft
wants to merge 21 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if ("${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
# Set some default BLT options before loading BLT only if not included in
# another project
if (NOT BLT_CXX_STD)
set(BLT_CXX_STD "c++14" CACHE STRING "")
set(BLT_CXX_STD "c++17" CACHE STRING "")
endif()

# These BLT tools are not used in Tribol, turn them off
Expand Down Expand Up @@ -160,7 +160,7 @@ endif()

set(TRIBOL_DEBUG_DEFINE_STRING "${TRIBOL_DEBUG_DEFINE_STRING}" CACHE STRING "" FORCE)
# Define AXOM_DEBUG for SLIC macros
string(REPLACE "TRIBOL" "AXOM" AXOM_DEBUG_DEFINE_STRING TRIBOL_DEBUG_DEFINE_STRING)
string(REPLACE "TRIBOL" "AXOM" AXOM_DEBUG_DEFINE_STRING "${TRIBOL_DEBUG_DEFINE_STRING}")
set(AXOM_DEBUG_DEFINE_STRING "${AXOM_DEBUG_DEFINE_STRING}" CACHE STRING "" FORCE)

#------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ to build Tribol.

The Tribol contact physics library requires:
- CMake 3.14 or higher
- C++14 compiler
- C++17 compiler
- MPI
- mfem
- axom
Expand Down
2 changes: 1 addition & 1 deletion scripts/spack/packages/tribol/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def initconfig_compiler_entries(self):
else:
entries.append(cmake_cache_option("ENABLE_FORTRAN", False))

entries.append(cmake_cache_string("BLT_CXX_STD", "c++14", ""))
entries.append(cmake_cache_string("BLT_CXX_STD", "c++17", ""))

# Add optimization flag workaround for Debug builds with
# cray compiler or newer HIP
Expand Down
24 changes: 24 additions & 0 deletions src/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,27 @@ if ( BUILD_REDECOMP )
endforeach()

endif()

if (ENABLE_BENCHMARKS)
blt_add_executable(
NAME array_benchmarks_ex
SOURCES array_benchmarks.cpp
OUTPUT_DIR ${EXAMPLE_OUTPUT_DIRECTORY}
DEPENDS_ON tribol gbenchmark ${tribol_device_depends}
)

if (ENABLE_CUDA)
set_target_properties(array_benchmarks_ex PROPERTIES CUDA_SEPARABLE_COMPILATION On)
endif()

if (ENABLE_HIP)
target_compile_options(array_benchmarks_ex PRIVATE -fgpu-rdc)
target_compile_options(array_benchmarks_ex PRIVATE
$<$<CONFIG:Debug>:
-ggdb
>
)
target_link_options(array_benchmarks_ex PRIVATE -fgpu-rdc)
target_link_options(array_benchmarks_ex PRIVATE --hip-link)
endif()
endif()
Loading
Loading