]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: let *_cuda targets depend on *.inst targets 3779/head
authorMatthias Maier <tamiko@43-1.org>
Thu, 12 Jan 2017 15:06:48 +0000 (09:06 -0600)
committerMatthias Maier <tamiko@43-1.org>
Thu, 12 Jan 2017 15:06:48 +0000 (09:06 -0600)
cmake/macros/macro_expand_instantiations.cmake

index 775f1da261df6973cd3301e3d5c74d177f7dc33c..02ec5019b1a5d5165f53ad3ad99c86646d0a593d 100644 (file)
@@ -23,9 +23,9 @@
 #
 # target
 #
-#    where target.${build_type} will depend on the generation of all .inst
-#    files, to ensure that all .inst files are generated prior to
-#    compiling.
+#    where target.${build_type} (and if present) target.${build_type}_cuda
+#    will depend on the generation of all .inst files, to ensure that all
+#    .inst files are generated prior to compiling.
 #
 # inst_in_files
 #
@@ -58,7 +58,7 @@ MACRO(EXPAND_INSTANTIATIONS _target _inst_in_files)
            < ${CMAKE_CURRENT_SOURCE_DIR}/${_inst_in_file}
            > ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file}.tmp
       COMMAND ${CMAKE_COMMAND}
-      ARGS -E rename 
+      ARGS -E rename
            ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file}.tmp
            ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file}
       )
@@ -78,7 +78,12 @@ MACRO(EXPAND_INSTANTIATIONS _target _inst_in_files)
   #
   FOREACH(_build ${DEAL_II_BUILD_TYPES})
     STRING(TOLOWER ${_build} _build_lowercase)
+
     ADD_DEPENDENCIES(${_target}.${_build_lowercase} ${_target}.inst)
+
+    IF(TARGET ${_target}.${_build_lowercase}_cuda)
+      ADD_DEPENDENCIES(${_target}.${_build_lowercase}_cuda ${_target}.inst)
+    ENDIF()
   ENDFOREACH()
 
 ENDMACRO()

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.