]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Only specify targets that are full paths in Make.global_options
authorMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 10 Apr 2013 09:25:18 +0000 (09:25 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 10 Apr 2013 09:25:18 +0000 (09:25 +0000)
git-svn-id: https://svn.dealii.org/trunk@29236 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/config/CMakeLists.txt

index bcd1f300b245d39c8030b0ec4804fc7a840cae5c..2364b73d81c8b687d39520e32a81190e2a46fc73 100644 (file)
@@ -66,7 +66,6 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES})
     ENDIF()
   ENDIF()
 
-
   #
   # Get library name directly from the target:
   #
@@ -148,7 +147,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
   #
   # Transform some cmake lists into a string that the old Makefile
   # mechanism actually understands:
-
+  #
   TO_STRING_AND_ADD_PREFIX(MAKEFILE_INCLUDE_DIRS "${CMAKE_INCLUDE_FLAG_CXX}"
     $(D)/${DEAL_II_INCLUDE_RELDIR}
     $(D)/${DEAL_II_INCLUDE_RELDIR}/deal.II
@@ -164,11 +163,25 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
       ${DEAL_II_USER_DEFINITIONS_${build}}
       )
 
-    TO_STRING(MAKEFILE_TARGETS_${build}
-        $(D)/${DEAL_II_LIBRARY_RELDIR}/${CONFIG_LIBRARY_${build}}
+    #
+    # Ideally, DEAL_II_EXTERNAL_LIBRARIES should just contain a list of
+    # full library paths. Nevertheless, filter out all elements that are
+    # not a full path starting with "/".
+    #
+    SET(_libs)
+    FOREACH(_lib
         ${DEAL_II_EXTERNAL_LIBRARIES}
         ${DEAL_II_EXTERNAL_LIBRARIES_${build}}
         )
+      IF(_lib MATCHES "^/")
+        LIST(APPEND _libs "${_lib}")
+      ENDIF()
+    ENDFOREACH()
+
+    TO_STRING(MAKEFILE_TARGETS_${build}
+        $(D)/${DEAL_II_LIBRARY_RELDIR}/${CONFIG_LIBRARY_${build}}
+        ${_libs}
+        )
 
     #
     # TODO: Come up with an idea how to get the link line directly from

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.