Skip to content

Commit f40200f

Browse files
authored
Merge pull request #2223 from martin-frbg/getarch-pgi
Make getarch compile with PGI
2 parents 9ef96b3 + a95a5e5 commit f40200f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile.system

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ endif
142142
endif
143143

144144

145-
# On x86_64 build getarch with march=native. This is required to detect AVX512 support in getarch.
145+
# On x86_64 build getarch with march=native unless the compiler is PGI. This is required to detect AVX512 support in getarch.
146146
ifeq ($(ARCH), x86_64)
147-
ifneq ($(C_COMPILER), PGI)
147+
ifeq ($(findstring pgcc,$(HOSTCC)),)
148148
GETARCH_FLAGS += -march=native
149149
endif
150150
endif

cmake/system.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if (DEFINED TARGET)
6666
endif ()
6767

6868
# On x86_64 build getarch with march=native. This is required to detect AVX512 support in getarch.
69-
if (X86_64)
69+
if (X86_64 AND NOT ${CMAKE_C_COMPILER_ID} STREQUAL "PGI")
7070
set(GETARCH_FLAGS "${GETARCH_FLAGS} -march=native")
7171
endif ()
7272

0 commit comments

Comments
 (0)