From: maier Date: Sat, 22 Sep 2012 00:37:05 +0000 (+0000) Subject: Bugfix X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8812a2f92e2c8887b5213e9aaf709b808bf88cd2;p=dealii-svn.git Bugfix git-svn-id: https://svn.dealii.org/branches/branch_cmake@26622 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/config/CMakeLists.txt b/deal.II/config/CMakeLists.txt index 168a347c92..0bd9b84bfb 100644 --- a/deal.II/config/CMakeLists.txt +++ b/deal.II/config/CMakeLists.txt @@ -70,11 +70,12 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES) # FOREACH(lib ${DEAL_II_EXTERNAL_LIBRARIES} ${DEAL_II_LIBRARIES}) GET_FILENAME_COMPONENT(path ${lib} PATH) - LIST(APPEND MAKEFILE_LDFLAGS "-Wl,-rpath -Wl,${path}") + LIST(APPEND MAKEFILE_RPATHFLAGS "-Wl,-rpath -Wl,${path}") ENDFOREACH() - LIST(REMOVE_DUPLICATES MAKEFILE_LDFLAGS) - TO_STRING(MAKEFILE_LDFLAGS ${MAKEFILE_LDFLAGS}) - SET(MAKEFILE_LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MAKEFILE_LDFLAGS}") + LIST(REMOVE_DUPLICATES MAKEFILE_RPATHFLAGS) + TO_STRING(MAKEFILE_RPATHFLAGS ${MAKEFILE_RPATHFLAGS}) + + SET(MAKEFILE_LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}") CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in diff --git a/deal.II/config/Make.global_options.in b/deal.II/config/Make.global_options.in index 2520ffbb37..799df43293 100644 --- a/deal.II/config/Make.global_options.in +++ b/deal.II/config/Make.global_options.in @@ -4,21 +4,25 @@ # Compatibility Make.global_options file # -# TODO: Update this comment: -############################################################################### -## Please note: -## The ./configure script generates Make.global_options from -## Make.global_options.in, so if you want to change something, -## then do it in the latter file and re-run ./configure in the -## top level directory -## -## -## This file exports several variables. They are documented in -## the file doc/development/makefiles.html. If you add a new -## variable, make sure it is documented in -## doc/development/makefiles.1.html and listed in -## doc/development/Makefile. -############################################################################### +# TODO: Update the old comment and put it back again +# +# - Setup OBJEXT and EXEEXT in a way this makefile expects them +# +# *** ISSUES *** +# +# - What is LIBS for? There is this other mechanism for specifying +# full paths of necessary libraries. We know all the libraries with full +# path, so we just use the latter mechanism and leave LIBS empty for now. +# +# - The link line "$(CXX) -o $@ $(LIBS) $(LDFLAGS)" +# of the examples is broken. LDFLAGS should be in front. As a workaround, +# we have to specify the rpath flags ${MAKEFILE_RPATHFLAGS} directly in +# front of the libraries. +# +# TODO: Set up the other configuration variables that are currently +# removed... +# + D = @CMAKE_INSTALL_PREFIX@ CXX = @CMAKE_CXX_COMPILER@ @@ -31,7 +35,7 @@ AR = @CMAKE_AR@ RANLIB = @CMAKE_RANLIB@ LDFLAGS = @MAKEFILE_LDFLAGS@ -#LIBS = @LIBS@ # TODO +LIBS = #Empty LIBDIR = @CMAKE_INSTALL_PREFIX@/@DEAL_II_LIBRARY_RELDIR@ @@ -42,7 +46,7 @@ DEAL_II_VERSION = @VERSION@ DEAL_II_MAJOR = @DEAL_II_MAJOR@ DEAL_II_MINOR = @DEAL_II_MINOR@ -DEAL_II_USE_MPI = @DEAL_II_USE_MPI@ +DEAL_II_USE_MPI = @DEAL_II_WITH_MPI@ #TARGET = @target@ # TODO @@ -72,8 +76,8 @@ EXEEXT = @EXEEXT@ # TODO # set paths to all the libraries we need: -lib-deal2.o = ${MAKEFILE_LIBRARIES} -lib-deal2.g = ${MAKEFILE_LIBRARIES} +lib-deal2.o = ${MAKEFILE_RPATHFLAGS} ${MAKEFILE_LIBRARIES} +lib-deal2.g = ${MAKEFILE_RPATHFLAGS} ${MAKEFILE_LIBRARIES} # necessary includes: