Merge pull request #4078 from martin-frbg/nv_cmake
Add support for NVIDIA HPC (nvc,pgf95) in CMAKE builds
This commit is contained in:
		
						commit
						95a584e252
					
				|  | @ -65,6 +65,14 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI") | ||||||
|   endif () |   endif () | ||||||
| endif () | endif () | ||||||
| 
 | 
 | ||||||
|  | if (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC") | ||||||
|  |   if (POWER) | ||||||
|  |     set(CCOMMON_OPT "${CCOMMON_OPT} -tp pwr8") | ||||||
|  |   else () | ||||||
|  |     set(CCOMMON_OPT "${CCOMMON_OPT} -tp px") | ||||||
|  |   endif () | ||||||
|  | endif () | ||||||
|  | 
 | ||||||
| if (${CMAKE_C_COMPILER_ID} STREQUAL "PATHSCALE") | if (${CMAKE_C_COMPILER_ID} STREQUAL "PATHSCALE") | ||||||
|   if (BINARY64) |   if (BINARY64) | ||||||
|     set(CCOMMON_OPT "${CCOMMON_OPT} -m64") |     set(CCOMMON_OPT "${CCOMMON_OPT} -m64") | ||||||
|  |  | ||||||
|  | @ -121,7 +121,7 @@ if (${F_COMPILER} STREQUAL "IBM") | ||||||
|   endif () |   endif () | ||||||
| endif () | endif () | ||||||
| 
 | 
 | ||||||
| if (${F_COMPILER} STREQUAL "PGI") | if (${F_COMPILER} STREQUAL "PGI" OR ${F_COMPILER} STREQUAL "PGF95") | ||||||
|   set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_PGI") |   set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_PGI") | ||||||
|   set(COMMON_PROF "${COMMON_PROF} -DPGICOMPILER") |   set(COMMON_PROF "${COMMON_PROF} -DPGICOMPILER") | ||||||
|   if (BINARY64) |   if (BINARY64) | ||||||
|  |  | ||||||
|  | @ -55,7 +55,7 @@ if (DEFINED TARGET) | ||||||
| endif () | endif () | ||||||
| 
 | 
 | ||||||
| # On x86_64 build getarch with march=native. This is required to detect AVX512 support in getarch. | # On x86_64 build getarch with march=native. This is required to detect AVX512 support in getarch. | ||||||
| if (X86_64 AND NOT ${CMAKE_C_COMPILER_ID} STREQUAL "PGI") | if (X86_64 AND NOT (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" OR ${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC")) | ||||||
|   set(GETARCH_FLAGS "${GETARCH_FLAGS} -march=native") |   set(GETARCH_FLAGS "${GETARCH_FLAGS} -march=native") | ||||||
| endif () | endif () | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue