fallback from cooperlake to skylake if gcc<10
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Wed, 19 Aug 2020 18:48:39 +0000 (20:48 +0200)
committerGitHub <noreply@github.com>
Wed, 19 Aug 2020 18:48:39 +0000 (20:48 +0200)
cmake/cc.cmake

index d760822..c490dd9 100644 (file)
@@ -110,6 +110,8 @@ if (${CORE} STREQUAL "COOPERLAKE")
       execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
       if (${GCC_VERSION} VERSION_GREATER 10.1 OR ${GCC_VERSION} VERSION_EQUAL 10.1)
         set (CCOMMON_OPT = "${CCOMMON_OPT} -march=cooperlake")
+      else ()
+        set (CCOMMON_OPT "${CCOMMON_OPT} -march=skylake-avx512")
       endif()  
     endif ()
   endif ()