Fix compiler flags for using MKL
authorMark Abraham <mark.j.abraham@gmail.com>
Sun, 3 Sep 2017 13:48:10 +0000 (15:48 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Sun, 3 Sep 2017 15:25:43 +0000 (17:25 +0200)
Change-Id: I860e43da8de3b563167ecee1f52e2017a0f27f7f

CMakeLists.txt
cmake/gmxManageFFTLibraries.cmake

index 9864bd500cf85dfeadeb64652ce0f2917b5005cf..52634bf9b89732faafceaaf2399679e3e035bea7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016, by the GROMACS development team, led by
+# Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017, 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.
@@ -328,6 +328,11 @@ gmx_c_flags()
 
 # This variable should be used for additional compiler flags which are not
 # generated in gmxCFlags nor are SIMD or MPI related.
+#
+# TODO These variables should be consolidated into
+# EXTRA_COMPILER_FLAGS so that we we don't perpetrate bugs where
+# things that work in C compilation (e.g. merging from old branches)
+# also work for C++ compilation.
 set(EXTRA_C_FLAGS "")
 set(EXTRA_CXX_FLAGS "")
 
index 800b2f633ca71fe5dec3230db5fee93413598e8f..6577ef201c858b46b79493bc41ecfa9478f64080 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012,2013,2014,2015,2016, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2016,2017, 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.
@@ -120,6 +120,7 @@ elseif(${GMX_FFT_LIBRARY} STREQUAL "MKL")
         # Some versions of icc require this in order that mkl.h can be
         # found at compile time.
         set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} ${FFT_LINKER_FLAGS}")
+        set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} ${FFT_LINKER_FLAGS}")
 
         set(MKL_ERROR_MESSAGE "Make sure you have configured your compiler so that ${FFT_LINKER_FLAGS} will work.")
     else()