Skip to content

Commit

Permalink
Merge pull request #1293 from LLNL/feature/han12/using_cmake_version
Browse files Browse the repository at this point in the history
using-with-cmake example cmake version
  • Loading branch information
bmhan12 committed Mar 18, 2024
2 parents 2c02493 + abdeab0 commit 3f59b0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .gitlab/build_rzansel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- rzansel
before_script:
- module load cuda/11.2.0
- module load cmake/3.18.0
- module load cmake/3.21.1

####
# Template
Expand Down
14 changes: 5 additions & 9 deletions src/examples/using-with-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
#
#------------------------------------------------------------------------------

cmake_minimum_required(VERSION 3.14)
if (ENABLE_HIP OR AXOM_ENABLE_HIP OR ENABLE_CUDA OR AXOM_ENABLE_CUDA)
cmake_minimum_required(VERSION 3.21)
else()
cmake_minimum_required(VERSION 3.18)
endif()

project(using_with_cmake)

Expand Down Expand Up @@ -70,14 +74,6 @@ if(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE)
${BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE})
endif()

# HACK: Define the `mpi` target as an alias to `axom::mpi` if/when necessary
# Details: An axom dependency has a link dependency to `mpi`, but it might
# not be a target. Need to mark axom::mpi as global to use it for an alias.
if(NOT TARGET mpi AND TARGET axom::mpi)
set_target_properties(axom::mpi PROPERTIES IMPORTED_GLOBAL TRUE)
add_library(mpi ALIAS axom::mpi)
endif()

#------------------------------------------------------------------------------
# Set up example target that depends on axom
#------------------------------------------------------------------------------
Expand Down

0 comments on commit 3f59b0c

Please sign in to comment.