From: Bruno Turcksin Date: Mon, 6 Nov 2017 02:12:55 +0000 (-0500) Subject: Fix a bug in cmake when using CUDA. X-Git-Tag: v9.0.0-rc1~815^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5405%2Fhead;p=dealii.git Fix a bug in cmake when using CUDA. If CUDA_SEPARABLE_COMPILATION is ON, we need to also use CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME and CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS. Otherwise the flags are not passed correctly during the linking phase. So we turn CUDA_SEPARABLE_COMPILATION OFF to fix this problem. --- diff --git a/cmake/macros/macro_deal_ii_add_library.cmake b/cmake/macros/macro_deal_ii_add_library.cmake index 69db8c7031..c6a0c8bdca 100644 --- a/cmake/macros/macro_deal_ii_add_library.cmake +++ b/cmake/macros/macro_deal_ii_add_library.cmake @@ -81,7 +81,7 @@ MACRO(DEAL_II_ADD_LIBRARY _library) ) SET_TARGET_PROPERTIES(${_library}_${_build_lowercase} PROPERTIES - CUDA_SEPARABLE_COMPILATION TRUE + CUDA_SEPARABLE_COMPILATION FALSE ) ENDIF() diff --git a/cmake/macros/macro_deal_ii_insource_setup_target.cmake b/cmake/macros/macro_deal_ii_insource_setup_target.cmake index 5c7181861c..fb19f757f5 100644 --- a/cmake/macros/macro_deal_ii_insource_setup_target.cmake +++ b/cmake/macros/macro_deal_ii_insource_setup_target.cmake @@ -81,7 +81,7 @@ MACRO(DEAL_II_INSOURCE_SETUP_TARGET _target _build) ) SET_TARGET_PROPERTIES(${_target} PROPERTIES - CUDA_SEPARABLE_COMPILATION TRUE + CUDA_SEPARABLE_COMPILATION FALSE ) ENDIF() ENDIF() diff --git a/cmake/macros/macro_deal_ii_setup_target.cmake b/cmake/macros/macro_deal_ii_setup_target.cmake index f642a3f92e..981b2ae8f6 100644 --- a/cmake/macros/macro_deal_ii_setup_target.cmake +++ b/cmake/macros/macro_deal_ii_setup_target.cmake @@ -152,7 +152,7 @@ MACRO(DEAL_II_SETUP_TARGET _target) ) SET_TARGET_PROPERTIES(${_target} PROPERTIES - CUDA_SEPARABLE_COMPILATION TRUE + CUDA_SEPARABLE_COMPILATION FALSE ) ENDIF() ENDIF()