Fixed CMake 2.8.12+ CUDA dylib bugs and warnings on OS X
authorErik Lindahl <erik@kth.se>
Tue, 17 Jun 2014 15:26:33 +0000 (17:26 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 18 Jun 2014 12:17:03 +0000 (14:17 +0200)
commitd9d2b0aa743becd6f40864c478e83007689f8cd5
treed244b43a7c7718be918f881e6f03b1d6faa9e062
parent239fe4f4e359533215dd7c2c1815e53f85751686
Fixed CMake 2.8.12+ CUDA dylib bugs and warnings on OS X

This patch fixes up a number of minor compilation issues
with CUDA on OS X. The __STRICT_ANSI__ define has been
added to make CUDA work with gcc version 4.8 and 4.9,
a dummy variable has been added to the dummy c++ gpu utils
file to avoid warnings about empty objects, and we now
properly handle both RPATH (newer CMake) and INSTALL_NAME_DIR
(older CMake) without warnings. CMake-2.8.12 introduced
a bug that caused Gromacs executables to be malformed since
the rpath to the CUDA libraries was added twice. This is
caused by fairly deep internal changes in CMake, but it has
been worked around by removing the rpath (which FindCUDA.cmake
only adds on OS X) manually for CMake>2.8.11.

Fixes #1471.

Change-Id: I8b01204dc07678bc305821162f20db65e0e7b88d
CMakeLists.txt
cmake/gmxManageGPU.cmake
cmake/gmxManageNvccConfig.cmake
src/gmxlib/CMakeLists.txt
src/gmxlib/gpu_utils/dummy.cpp
src/kernel/CMakeLists.txt
src/mdlib/CMakeLists.txt
src/tools/CMakeLists.txt