From 9401148a225b7f448101f66d98cfb5a397c1b8ca Mon Sep 17 00:00:00 2001 From: "TESLA01\\soerenpeters" <peters@irmb.tu-bs.de> Date: Wed, 9 Dec 2020 14:51:51 +0100 Subject: [PATCH] Set cuda_resolve_devices_symbols to on when a static library is build for the gridgenerator. --- src/gpu/GridGenerator/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gpu/GridGenerator/CMakeLists.txt b/src/gpu/GridGenerator/CMakeLists.txt index 7c4b0bece..46866937e 100644 --- a/src/gpu/GridGenerator/CMakeLists.txt +++ b/src/gpu/GridGenerator/CMakeLists.txt @@ -6,4 +6,11 @@ vf_get_library_name(library_name) linkCUDA() linkOpenMP(${library_name}) -set_target_properties(${library_name} PROPERTIES CUDA_SEPARABLE_COMPILATION ON) \ No newline at end of file + +set_target_properties(${library_name} PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# according to linker error when building static libraries. +# https://stackoverflow.com/questions/50033435/cmake-cuda-separate-compilation-static-lib-link-error-on-windows-but-not-on-ubun +if (NOT BUILD_SHARED_LIBRARY) + set_target_properties(${library_name} PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON) +endif() \ No newline at end of file -- GitLab