phist: add a patch for the case +host arch=ppc64le (#26216)

This commit is contained in:
Jonas Thies 2021-10-05 10:33:41 +02:00 committed by GitHub
parent 7ea9c75494
commit 7f2fd50d20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -103,8 +103,10 @@ class Phist(CMakePackage):
# ###################### Patches ##########################
# resolve #22758: while SSE instructions are handled correctly, but a compile-time
# error will occur unless -DNO_WARN_X86_INTRINSICS is defined.
patch('ppc64_sse.patch', when='@1.7.4:1.9.4')
patch('update_tpetra_gotypes.patch', when='@:1.8')
patch('sbang.patch', when='+fortran')
# ###################### Dependencies ##########################

View file

@ -0,0 +1,12 @@
--- a/cmake/SetHostCompileFlag.cmake
+++ b/cmake/SetHostCompileFlag.cmake
@@ -45,3 +45,9 @@ cmake_pop_check_state() # Recover variables
foreach (LANG C CXX Fortran)
set(CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS} ${${LANG}_ARCH_FLAG}")
endforeach()
+
+if(PHIST_HOST_OPTIMIZE)
+ if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
+ add_definitions(-DNO_WARN_X86_INTRINSICS)
+ endif()
+endif()