From: Szilard Pall Date: Mon, 8 Oct 2012 22:54:56 +0000 (+0200) Subject: force C++ linking of the gpu_utils X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=77ad1a4898b252bd71a8a671e65ed91774f6268a;p=alexxy%2Fgromacs.git force C++ linking of the gpu_utils Commit c0180203d4247d5e6 forced C++ linkage of all main functions. But Carlo Camilloni reported that this can still give linker errors. This should enforce C++ linkage also of libgmx. Change-Id: I9a82637b792d727ea95e1dc6990099b621fc8ef2 --- diff --git a/src/gmxlib/gpu_utils/CMakeLists.txt b/src/gmxlib/gpu_utils/CMakeLists.txt index 660d98732b..1ad107dfdb 100644 --- a/src/gmxlib/gpu_utils/CMakeLists.txt +++ b/src/gmxlib/gpu_utils/CMakeLists.txt @@ -50,7 +50,7 @@ endif() CUDA_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) set(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE OFF) -file(GLOB GPU_UTILS_SOURCES *.cu) +file(GLOB GPU_UTILS_SOURCES *.cu dummy.cpp) CUDA_ADD_LIBRARY(gpu_utils STATIC ${GPU_UTILS_SOURCES} OPTIONS ${_os_def} RELWITHDEBINFO -g diff --git a/src/gmxlib/gpu_utils/dummy.cpp b/src/gmxlib/gpu_utils/dummy.cpp new file mode 100644 index 0000000000..aa1d4efdf9 --- /dev/null +++ b/src/gmxlib/gpu_utils/dummy.cpp @@ -0,0 +1,3 @@ +/* This source file has the sole purpose to force C++ linking of the gpu_utils + * static archive, otherwise the exception handling code generated inside + * memtestG80 will cause undefined symbols at linking. */