]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Avoid bogus preprocessor definitions
authorMatthias Maier <tamiko@43-1.org>
Thu, 12 Jan 2017 16:24:07 +0000 (10:24 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 13 Jan 2017 09:32:35 +0000 (03:32 -0600)
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

index fb384c5366d1f840ddc697156e99d0cda48b543b..643536f2bf7b0432f28e7ef7cd1eb7d1f682ba81 100644 (file)
@@ -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"
       )

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.