From: Matthias Maier Date: Thu, 12 Jan 2017 15:06:48 +0000 (-0600) Subject: CMake: let *_cuda targets depend on *.inst targets X-Git-Tag: v8.5.0-rc1~256^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3779%2Fhead;p=dealii.git CMake: let *_cuda targets depend on *.inst targets --- diff --git a/cmake/macros/macro_expand_instantiations.cmake b/cmake/macros/macro_expand_instantiations.cmake index 775f1da261..02ec5019b1 100644 --- a/cmake/macros/macro_expand_instantiations.cmake +++ b/cmake/macros/macro_expand_instantiations.cmake @@ -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()