Fix compile with Intel oneAPI 2021.2
[alexxy/gromacs.git] / cmake / gmxManageFFTLibraries.cmake
index f59e011ecc86f7f72d27d668424ce369b5c0e6ec..bc310470b1523572c0f09057800813d4d0167d5e 100644 (file)
@@ -2,7 +2,7 @@
 # This file is part of the GROMACS molecular simulation package.
 #
 # Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
-# Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+# Copyright (c) 2017,2018,2019,2020,2021, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -33,8 +33,6 @@
 # To help us fund GROMACS development, we humbly ask that you cite
 # the research papers on the package. Check out http://www.gromacs.org.
 
-include(gmxTestICCNextGen)
-
 # Manage setup of the different FFT libraries we can use in Gromacs.
 set(PKG_FFT "")
 set(PKG_FFT_LIBS "")
@@ -44,7 +42,7 @@ set(PKG_FFT_LIBS "")
 set(MKL_MANUALLY FALSE)
 if (GMX_FFT_LIBRARY STREQUAL "MKL" AND
     NOT ((CMAKE_C_COMPILER_ID MATCHES "Intel" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "11")
-         OR GMX_ICC_NEXTGEN))
+         OR GMX_INTEL_LLVM))
     # The user will have to provide the set of magic libraries in
     # MKL_LIBRARIES (see below), which we cache (non-advanced), so that they
     # don't have to keep specifying it, and can easily see that
@@ -138,6 +136,8 @@ elseif(${GMX_FFT_LIBRARY} STREQUAL "MKL")
             # docs, but on Jenkins Win2k8, icl tries to interpret it
             # as a file. Shrug.
             set(FFT_LINKER_FLAGS "/Qmkl:sequential")
+        elseif(GMX_INTEL_LLVM AND GMX_INTEL_LLVM_VERSION GREATER_EQUAL 2021020)
+            set(FFT_LINKER_FLAGS "-qmkl=sequential")
         else()
             set(FFT_LINKER_FLAGS "-mkl=sequential")
         endif()