From: maier Date: Wed, 10 Apr 2013 09:25:18 +0000 (+0000) Subject: CMake: Only specify targets that are full paths in Make.global_options X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3517e654f88962edabc8a139012e0a2db528cae;p=dealii-svn.git 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 --- 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