From: Matthias Maier Date: Thu, 12 Jan 2017 16:24:07 +0000 (-0600) Subject: CMake: Avoid bogus preprocessor definitions X-Git-Tag: v8.5.0-rc1~250^2~6 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b2fe4d73a37df33f7311dfe69dfdcb1d492562e;p=dealii.git CMake: Avoid bogus preprocessor definitions The macro CUDA_WARP_SRCS expects the target to have a set of preprocessor definitions that does not contain an empty element. --- diff --git a/cmake/macros/macro_deal_ii_add_library.cmake b/cmake/macros/macro_deal_ii_add_library.cmake index fb384c5366..643536f2bf 100644 --- a/cmake/macros/macro_deal_ii_add_library.cmake +++ b/cmake/macros/macro_deal_ii_add_library.cmake @@ -37,9 +37,19 @@ MACRO(DEAL_II_ADD_LIBRARY _library) ${ARGN} ) + + # + # Work around a problem in CUDA_WARP_SRCS that doesn't take empty list + # elements lightly... + # + SET(_definitions + ${DEAL_II_DEFINITIONS} + ${DEAL_II_DEFINITIONS_${_build}} + ) + SET_TARGET_PROPERTIES(${_library}.${_build_lowercase} PROPERTIES LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}" - COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}" + COMPILE_DEFINITIONS "${_definitions}" COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}" LINKER_LANGUAGE "CXX" )