Add initial support for python bindings
[alexxy/gromacs.git] / cmake / gmxManageLinearAlgebraLibraries.cmake
index 540b403b127b34dba5b57c4d859e52425879ef11..8c8562b9c75dc100154a1679ee369d26dc821284 100644 (file)
@@ -1,3 +1,37 @@
+#
+# This file is part of the GROMACS molecular simulation package.
+#
+# Copyright (c) 2013,2014, 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.
+#
+# GROMACS is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1
+# of the License, or (at your option) any later version.
+#
+# GROMACS is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with GROMACS; if not, see
+# http://www.gnu.org/licenses, or write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+#
+# If you want to redistribute modifications to GROMACS, please
+# consider that scientific software is very special. Version
+# control is crucial - bugs must be traceable. We will be happy to
+# consider code for inclusion in the official distribution, but
+# derived work must not be called official GROMACS. Details are found
+# in the README & COPYING files - if they are missing, get the
+# official version 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.
+
 # Helper macro for the function below. We treat BLAS and LAPACK the same
 # way, so there's no reason to duplicate the logic for them
 #
@@ -51,7 +85,8 @@ macro(manage_linear_algebra_library name function_in_library)
         endif()
 
         if(NOT _library_was_found AND HAVE_LIBMKL)
-            set(CMAKE_REQUIRED_LIBRARIES ${FFT_LINKER_FLAGS} ${FFT_LIBRARIES})
+            set(CMAKE_REQUIRED_LIBRARIES "${FFT_LIBRARIES}")
+            set(CMAKE_REQUIRED_FLAGS "${FFT_LINKER_FLAGS}")
             # This may also not work correctly if the user changes
             # MKL_LIBRARIES after the first run. However,
             # MKL_LIBRARIES is only needed for icc version < 11, or
@@ -85,7 +120,7 @@ macro(manage_linear_algebra_library name function_in_library)
         endif()
 
         if (NOT _library_was_found AND NOT _find_quietly)
-            message("${_message_text}A ${name} library was not found by CMake in the paths available to it. Falling back on the GROMACS internal version of the ${name} library instead. This is fine for normal usage.")
+            message(STATUS "${_message_text}Using GROMACS built-in ${name}.")
         endif()
     endif()
 
@@ -105,7 +140,7 @@ macro(manage_linear_algebra_library name function_in_library)
     if(GMX_EXTERNAL_${name})
         if (NOT _library_was_found)
             message(FATAL_ERROR "You have set GMX_EXTERNAL_${name}=ON to instruct GROMACS to use an external ${name} library, but no external library could be detected.")
-        endif ()
+        endif()
         # Actually trigger linking.
         list(APPEND LINEAR_ALGEBRA_LIBRARIES ${_libraries_to_link})
     else()