From 6b2fe4d73a37df33f7311dfe69dfdcb1d492562e Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 12 Jan 2017 10:24:07 -0600 Subject: [PATCH] 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. --- cmake/macros/macro_deal_ii_add_library.cmake | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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" ) -- 2.39.5