Don't set CFLAGS for Phi in toolchain
[alexxy/gromacs.git] / cmake / Platform / XeonPhi.cmake
index 3e7956a83c73d4bf773af0f3394682136ef53455..a23feaf9f84947085f3baff62e3ddaedb8fd0e10 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2014, by the GROMACS development team, led by
+# Copyright (c) 2014,2015, 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.
 #
 # To help us fund GROMACS development, we humbly ask that you cite
 # the research papers on the package. Check out http://www.gromacs.org.
+
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR XeonPhi)
 if(NOT GMX_MPI)
     set(CMAKE_C_COMPILER "icc")
     set(CMAKE_CXX_COMPILER "icpc")
 else()
-    set(CMAKE_C_COMPILER "mpiicc")
+    set(CMAKE_C_COMPILER "mpiicc") #FindMPI doesn't work (#14991)
     set(CMAKE_CXX_COMPILER "mpiicpc")
-    set(GMX_PREFER_STATIC_LIBS ON CACHE BOOL "Shared libraries on Xeon Phi with MPI don't work.")
 endif()
-set(CMAKE_CXX_FLAGS "-mmic" CACHE STRING "Flags used by the compiler during all build types.")
-set(CMAKE_C_FLAGS "-mmic" CACHE STRING "Flags used by the compiler during all build types.")
-set(GMX_FFT_LIBRARY "mkl" CACHE STRING "FFT library")