mirror of https://github.com/QMCPACK/qmcpack.git
Add more warning and traps.
This commit is contained in:
parent
fef6b26b3b
commit
beb95184d4
|
@ -76,6 +76,10 @@ if(ENABLE_CUDA AND QMC_CUDA)
|
||||||
message(FATAL_ERROR "ENABLE_CUDA=ON and QMC_CUDA=ON can not be set together!")
|
message(FATAL_ERROR "ENABLE_CUDA=ON and QMC_CUDA=ON can not be set together!")
|
||||||
endif(ENABLE_CUDA AND QMC_CUDA)
|
endif(ENABLE_CUDA AND QMC_CUDA)
|
||||||
|
|
||||||
|
if(ENABLE_OFFLOAD AND QMC_CUDA)
|
||||||
|
message(FATAL_ERROR "ENABLE_OFFLOAD=ON doesn't work together with QMC_CUDA=ON! Did you mean ENABLE_CUDA=ON?")
|
||||||
|
endif()
|
||||||
|
|
||||||
# set CMAKE_CUDA_ARCHITECTURES early such that offload compilers may take advantage of it
|
# set CMAKE_CUDA_ARCHITECTURES early such that offload compilers may take advantage of it
|
||||||
if(ENABLE_CUDA OR QMC_CUDA AND NOT QMC_CUDA2HIP)
|
if(ENABLE_CUDA OR QMC_CUDA AND NOT QMC_CUDA2HIP)
|
||||||
if(DEFINED CUDA_ARCH)
|
if(DEFINED CUDA_ARCH)
|
||||||
|
@ -269,6 +273,12 @@ if(NOT CMAKE_CXX_COMPILER_ID STREQUAL CMAKE_C_COMPILER_ID)
|
||||||
"C compiler is ${CMAKE_C_COMPILER_ID} but C++ compiler is ${CMAKE_CXX_COMPILER_ID}.")
|
"C compiler is ${CMAKE_C_COMPILER_ID} but C++ compiler is ${CMAKE_CXX_COMPILER_ID}.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(${COMPILER} MATCHES "Clang" AND ENABLE_OFFLOAD AND QMC_CUDA2HIP AND NOT QMC_OFFLOAD_MEM_ASSOCIATED)
|
||||||
|
message(WARNING "Ignore this if Cray compilers are used! "
|
||||||
|
"Detected ENABLE_OFFLOAD=ON and QMC_CUDA2HIP=ON but QMC_OFFLOAD_MEM_ASSOCIATED=OFF. "
|
||||||
|
"As of 11/2021, QMC_OFFLOAD_MEM_ASSOCIATED=ON is needed for AMD and mainline LLVM compilers.")
|
||||||
|
endif()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# Set C++ minimum standard and run basic checks
|
# Set C++ minimum standard and run basic checks
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue