From 0c7b33b2f4fe16426444ab5473c9975f823f3977 Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 12 Sep 2012 21:29:28 +0000 Subject: [PATCH] Minor changes on the library configuration git-svn-id: https://svn.dealii.org/branches/branch_cmake@26328 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/CMakeLists.txt | 15 +++++++++++---- deal.II/source/CMakeLists.txt | 16 ++++++++++++---- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt index 802cc2a718..a1b7d819f3 100644 --- a/deal.II/CMakeLists.txt +++ b/deal.II/CMakeLists.txt @@ -56,7 +56,7 @@ OPTION(DEAL_II_WITH_METIS OPTION(DEAL_II_WITH_MPI "Build deal.II with support for mpi." - OFF) + ON) OPTION(DEAL_II_WITH_NETCDF "Build deal.II with support for netcdf." @@ -154,13 +154,12 @@ SET(DEAL_II_PATH ${CMAKE_INSTALL_PREFIX}) # Now, configure a lot of things: # -# used as a dummy target for all the stuff that has to be done before the +# Used as a dummy target for all the stuff that has to be done before the # library can be compiled: ADD_CUSTOM_TARGET(deal_ii_target_dependencies) -# used to keep track of external libraries and necessary linker flags +# Used to keep track of external libraries and necessary linker flags SET(deal_ii_external_libraries "") -SET(deal_ii_external_debug_libraries "") SET(deal_ii_required_linker_flags "") # @@ -207,6 +206,14 @@ IF(DEAL_II_WITH_ZLIB) ENDIF() +# And finally convert deal_ii_required_linker_flags from a list into a +# string *sigh* +# TODO: Encapsulate in a macro... +SET(deal_ii_required_linker_flags_list ${deal_ii_required_linker_flags}) +SET(deal_ii_required_linker_flags "") +FOREACH (arg ${deal_ii_required_linker_flags_list}) + SET(deal_ii_required_linker_flags "${deal_ii_required_linker_flags} ${arg}") +ENDFOREACH() # diff --git a/deal.II/source/CMakeLists.txt b/deal.II/source/CMakeLists.txt index 7e40aa94cc..6bf3ab7ac2 100644 --- a/deal.II/source/CMakeLists.txt +++ b/deal.II/source/CMakeLists.txt @@ -2,6 +2,7 @@ # Compile the deal.II library # + # # Each subdirectory specifies an OBJECT target: # @@ -15,6 +16,7 @@ ADD_SUBDIRECTORY(lac) ADD_SUBDIRECTORY(multigrid) ADD_SUBDIRECTORY(numerics) + # # Combine all OBJECT targets to a shared library: # @@ -34,15 +36,21 @@ ADD_LIBRARY(deal_II SHARED ${deal_ii_additional_object_files} ) + # -# Sonaming: Well... we just use the version number. No point to wrack -# one's brain over the question whether a C++ library is still ABI -# backwards compatible. +# Sonaming: Well... we just use the version number. +# No point to wrack one's brain over the question whether a C++ library is +# still ABI backwards compatible. # SET_TARGET_PROPERTIES(deal_II PROPERTIES VERSION ${VERSION} SOVERSION ${VERSION} ) -TARGET_LINK_LIBRARIES(deal_II ${deal_ii_required_linker_flags} ${deal_ii_external_libraries}) # TODO +SET_TARGET_PROPERTIES(deal_II PROPERTIES + LINK_FLAGS "${deal_ii_required_linker_flags}" + ) + + +TARGET_LINK_LIBRARIES(deal_II ${deal_ii_external_libraries}) -- 2.39.5