mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-13 09:51:57 -06:00
lower cmake version, keep it for HIP
This commit is contained in:
parent
40b3cc049c
commit
69a45b632e
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
# Mandatory call to project
|
# Mandatory call to project
|
||||||
|
|
||||||
cmake_minimum_required (VERSION 3.21)
|
cmake_minimum_required (VERSION 3.10)
|
||||||
|
|
||||||
project(opm-simulators C CXX)
|
project(opm-simulators C CXX)
|
||||||
|
|
||||||
@ -35,7 +35,8 @@ option(USE_BDA_BRIDGE "Enable the BDA bridge (GPU/AMGCL solvers)" ON)
|
|||||||
option(USE_TRACY_PROFILER "Enable tracy profiling" OFF)
|
option(USE_TRACY_PROFILER "Enable tracy profiling" OFF)
|
||||||
option(CONVERT_CUDA_TO_HIP "Convert CUDA code to HIP (to run on AMD cards)" OFF)
|
option(CONVERT_CUDA_TO_HIP "Convert CUDA code to HIP (to run on AMD cards)" OFF)
|
||||||
|
|
||||||
if (CONVERT_CUDA_TO_HIP)
|
# HIP requires cmake version 3.21
|
||||||
|
if (CONVERT_CUDA_TO_HIP AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.21")
|
||||||
enable_language(HIP)
|
enable_language(HIP)
|
||||||
message("CUDA code will be hipified")
|
message("CUDA code will be hipified")
|
||||||
set(HAVE_CUDA 1) # we still need this defined so that the preprocessor does not remove the code
|
set(HAVE_CUDA 1) # we still need this defined so that the preprocessor does not remove the code
|
||||||
|
Loading…
Reference in New Issue
Block a user