]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a bug in cmake when using CUDA. 5405/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Mon, 6 Nov 2017 02:12:55 +0000 (21:12 -0500)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Mon, 6 Nov 2017 02:12:55 +0000 (21:12 -0500)
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.

cmake/macros/macro_deal_ii_add_library.cmake
cmake/macros/macro_deal_ii_insource_setup_target.cmake
cmake/macros/macro_deal_ii_setup_target.cmake

index 69db8c70314b499a75d80ac87d8087a895ef4951..c6a0c8bdca2079facf342527785f3d47cbb41511 100644 (file)
@@ -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()
 
index 5c7181861ced435ffa07c27e908264c1a93cba5e..fb19f757f51ef6bbffda0ebdb5f15b423ccac08e 100644 (file)
@@ -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()
index f642a3f92ec56be109f361c707e6c2e44736eb66..981b2ae8f662e31aa7408cd42d9c5696a7670f03 100644 (file)
@@ -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()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.