isaac-server: Don't add -march=native on ARM and gcc 5.x or before. (#12042)

This commit is contained in:
Toyohisa Kameyama 2019-07-24 06:48:25 +09:00 committed by Adam J. Stewart
parent 39139b9db8
commit 6b07407cd0
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,18 @@
diff -ru spack-src/server/CMakeLists.txt spack-src.new/server/CMakeLists.txt
--- spack-src/server/CMakeLists.txt 2018-06-12 23:00:55.000000000 +0900
+++ spack-src.new/server/CMakeLists.txt 2019-07-16 19:05:23.842478919 +0900
@@ -84,7 +84,13 @@
add_definitions(-DISAAC_JPEG)
endif (ISAAC_JPEG)
-add_definitions(-std=c++11 -march=native -mtune=native)
+if (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 AND
+ CMAKE_C_COMPILER_ID STREQUAL GNU AND
+ CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0)
+ add_definitions(-std=c++11)
+else ()
+ add_definitions(-std=c++11 -march=native -mtune=native)
+endif ()
add_executable(isaac ${HDRS} ${SRCS})

View file

@ -35,5 +35,6 @@ class IsaacServer(CMakePackage):
# https://github.com/ComputationalRadiationPhysics/isaac/pull/70
patch('jpeg.patch', when='@:1.3.1')
patch('arm.patch', when='@:1.4.0 target=aarch64')
root_cmakelists_dir = 'server'