diff options
author | Tin Huynh <ahuynh@nvidia.com> | 2020-08-26 02:54:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-27 14:53:02 (GMT) |
commit | 76dee5831b82646a06afc3974de2922f4ace79f4 (patch) | |
tree | bd7c0b133e897ad5f878ce63f2c60cb5f098238e /Modules/FindOpenACC.cmake | |
parent | ff7bab83c20900fd631cd0692120e3d7788182b1 (diff) | |
download | CMake-76dee5831b82646a06afc3974de2922f4ace79f4.zip CMake-76dee5831b82646a06afc3974de2922f4ace79f4.tar.gz CMake-76dee5831b82646a06afc3974de2922f4ace79f4.tar.bz2 |
FindOpenACC: Add support for NVHPC compiler
Diffstat (limited to 'Modules/FindOpenACC.cmake')
-rw-r--r-- | Modules/FindOpenACC.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindOpenACC.cmake b/Modules/FindOpenACC.cmake index da050cd..cf58f3b 100644 --- a/Modules/FindOpenACC.cmake +++ b/Modules/FindOpenACC.cmake @@ -12,7 +12,7 @@ Detect OpenACC support by the compiler. This module can be used to detect OpenACC support in a compiler. If the compiler supports OpenACC, the flags required to compile with OpenACC support are returned in variables for the different languages. -Currently, only PGI, GNU and Cray compilers are supported. +Currently, only NVHPC, PGI, GNU and Cray compilers are supported. Imported Targets ^^^^^^^^^^^^^^^^ @@ -139,6 +139,7 @@ endfunction() function(_OPENACC_GET_FLAGS_CANDIDATE LANG FLAG_VAR) + set(ACC_FLAG_NVHPC "-acc") set(ACC_FLAG_PGI "-acc") set(ACC_FLAG_GNU "-fopenacc") set(ACC_FLAG_Cray "-h acc") @@ -155,6 +156,7 @@ endfunction() function(_OPENACC_GET_ACCEL_TARGET_FLAG LANG TARGET FLAG_VAR) # Find target accelerator flags. + set(ACC_TARGET_FLAG_NVHPC "-ta") set(ACC_TARGET_FLAG_PGI "-ta") if(DEFINED ACC_TARGET_FLAG_${CMAKE_${LANG}_COMPILER_ID}) set("${FLAG_VAR}" "${ACC_TARGET_FLAG_${CMAKE_${LANG}_COMPILER_ID}}=${TARGET}" PARENT_SCOPE) @@ -164,6 +166,7 @@ endfunction() function(_OPENACC_GET_VERBOSE_FLAG LANG FLAG_VAR) # Find compiler's verbose flag for OpenACC. + set(ACC_VERBOSE_FLAG_NVHPC "-Minfo=accel") set(ACC_VERBOSE_FLAG_PGI "-Minfo=accel") if(DEFINED ACC_VERBOSE_FLAG_${CMAKE_${LANG}_COMPILER_ID}) set("${FLAG_VAR}" "${ACC_VERBOSE_FLAG_${CMAKE_${LANG}_COMPILER_ID}}" PARENT_SCOPE) |