From 83343db0cddaa1e4ab3dcdaabfb1e428db54a3d8 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 10 Apr 2013 09:25:18 +0000 Subject: [PATCH] CMake: Only specify targets that are full paths in Make.global_options git-svn-id: https://svn.dealii.org/trunk@29236 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/config/CMakeLists.txt | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/deal.II/cmake/config/CMakeLists.txt b/deal.II/cmake/config/CMakeLists.txt index bcd1f300b2..2364b73d81 100644 --- a/deal.II/cmake/config/CMakeLists.txt +++ b/deal.II/cmake/config/CMakeLists.txt @@ -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 -- 2.39.5