From ffc9d0183d9c989aa61fd0570bb37f6239c0f04c Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Sun, 3 Sep 2017 15:48:10 +0200 Subject: [PATCH] Fix compiler flags for using MKL Change-Id: I860e43da8de3b563167ecee1f52e2017a0f27f7f --- CMakeLists.txt | 7 ++++++- cmake/gmxManageFFTLibraries.cmake | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9864bd500c..52634bf9b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "") diff --git a/cmake/gmxManageFFTLibraries.cmake b/cmake/gmxManageFFTLibraries.cmake index 800b2f633c..6577ef201c 100644 --- a/cmake/gmxManageFFTLibraries.cmake +++ b/cmake/gmxManageFFTLibraries.cmake @@ -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() -- 2.11.4.GIT