Skip to content

Commit

Permalink
CMake: 3.24+
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Jan 16, 2025
1 parent 2dfd180 commit 1c2e6aa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions ExampleCodes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.24)

project( AMReX-Tutorials
DESCRIPTION "Tutorials for the AMReX adaptive mesh refinement framework"
Expand Down Expand Up @@ -51,6 +51,14 @@ if( NOT DEFINED AMReX_DIR )
set(AMReX_GIT_BRANCH "development" CACHE STRING "The AMReX branch to checkout")
set(AMReX_INSTALL "NO" CACHE INTERNAL "Disable install target for amrex")

if(AMReX_FORTRAN)
enable_language(Fortran)
endif ()

if(AMReX_GPU_BACKEND STREQUAL "CUDA")
enable_language(CUDA)
endif()

include(FetchContent)
set(FETCHCONTENT_QUIET OFF) # Verbose ON

Expand Down Expand Up @@ -164,10 +172,6 @@ endif ()

if(AMReX_GPU_BACKEND STREQUAL "CUDA")
enable_language(CUDA)
# AMReX 21.06+ supports CUDA_ARCHITECTURES
if(CMAKE_VERSION VERSION_LESS 3.20)
include(AMReX_SetupCUDA)
endif()
endif()
endif()
else()
Expand All @@ -178,10 +182,6 @@ else()

if(AMReX_GPU_BACKEND STREQUAL "CUDA")
enable_language(CUDA)
# AMReX 21.06+ supports CUDA_ARCHITECTURES
if(CMAKE_VERSION VERSION_LESS 3.20)
include(AMReX_SetupCUDA)
endif()
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion GuidedTutorials/HeatEquation/Exec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# For additional CMake compile options see
# https://amrex-codes.github.io/amrex/docs_html/BuildingAMReX.html#building-with-cmake

cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.24)

## Project name and source file languages
project(HeatEquation_EX0
Expand Down
2 changes: 1 addition & 1 deletion GuidedTutorials/HeatEquation_Simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# For additional CMake compile options see
# https://amrex-codes.github.io/amrex/docs_html/BuildingAMReX.html#building-with-cmake

cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.24)

# Project name and source file languages
project(HeatEquation_Simple
Expand Down
2 changes: 1 addition & 1 deletion GuidedTutorials/HelloWorld/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@



cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.24)

# Project name and source file language
project(HelloWorld
Expand Down
2 changes: 1 addition & 1 deletion GuidedTutorials/MultiFab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@



cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.24)

# Project name and source file language
project(MultiFab
Expand Down

0 comments on commit 1c2e6aa

Please sign in to comment.