]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Rudimentary linkage
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 12 Sep 2012 17:25:59 +0000 (17:25 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 12 Sep 2012 17:25:59 +0000 (17:25 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26320 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/cmake-TODO
deal.II/contrib/cmake/configure/configure_mpi.cmake
deal.II/contrib/cmake/configure/configure_umfpack.cmake
deal.II/include/deal.II/base/config.h.in
deal.II/include/deal.II/base/config.h.in.old
deal.II/source/CMakeLists.txt

index 8b8c927da13abd246db6c5030616060bc7ce8b36..6ce276ec485e8323d3f0301c258206e17301a2bf 100644 (file)
@@ -42,51 +42,6 @@ SET(VERSION "8.0.pre")
 #
 #
 
-
-
-
-#
-# General configuration for cmake:
-#
-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-
-SET(CMAKE_INCLUDE_CURRENT_DIR true)
-
-SET(CMAKE_MODULE_PATH
-  ${CMAKE_MODULE_PATH}
-  "${CMAKE_SOURCE_DIR}/contrib/cmake/check/"
-  "${CMAKE_SOURCE_DIR}/contrib/cmake/configure/"
-  "${CMAKE_SOURCE_DIR}/contrib/cmake/macros/"
-  "${CMAKE_SOURCE_DIR}/contrib/cmake/modules/"
-  )
-
-
-
-
-#
-# Set up deal.II specific variables
-#
-
-SET(DEAL_II_PACKAGE_BUGREPORT "dealii@dealii.org")
-SET(DEAL_II_PACKAGE_NAME "deal.II")
-SET(DEAL_II_PACKAGE_TARNAME ${DEAL_II_PACKAGE_NAME})
-SET(DEAL_II_PACKAGE_VERSION ${VERSION})
-SET(DEAL_II_PACKAGE_STRING "${DEAL_II_PACKAGE_NAME} ${DEAL_II_PACKAGE_VERSION}")
-SET(DEAL_II_PACKAGE_URL "")
-STRING(REGEX REPLACE "^([0-9]+)\\..*" "\\1" DEAL_II_MAJOR "${VERSION}")
-STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_MINOR "${VERSION}")
-SET(DEAL_II_PATH ${CMAKE_INSTALL_PREFIX})
-
-
-
-#TODO:
-SET(CMAKE_CXX_FLAGS "-Wfatal-errors -D_REENTRANT -fPIC -O2 -march=native")
-SET(CMAKE_C_FLAGS "-Wfatal-errors -D_REENTRANT -fPIC -O2 -march=native")
-
-
-
-
 #
 # General configuration options:
 #
@@ -119,6 +74,10 @@ OPTION(DEAL_II_WITH_ZLIB
   "Build deal.II with support for zlib."
   ON)
 
+#
+# Options for library selection:
+#
+
 OPTION(DEAL_II_ALLOW_CONTRIB
   "Allow the use of contrib libraries bundled with the source tarball.
   Note: If set to off DEAL_II_FORCE_CONTRIB* will still pull in bundled
@@ -143,9 +102,66 @@ OPTION(DEAL_II_FORCE_CONTRIB_UMFPACK
   "Always use the bundled umfpack library instead of an external one."
   OFF)
 
+#
+# Configuration options regarding linkage:
+#
+
+#OPTION(DEAL_II_SET_SONAME
+#  "Set the soname."
+#  ON)
+
+#
+# Compatibility support:
+#
+
+OPTION(DEAL_II_COMPAT_MAPPING
+  "Backward compatibility support for functions and classes that do not
+  take an explicit mapping variable, but rather use a default Q1 mapping
+  instead."
+  ON)
+
+
+
+#
+# General configuration for cmake:
+#
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+SET(CMAKE_INCLUDE_CURRENT_DIR true)
+
+SET(CMAKE_MODULE_PATH
+  ${CMAKE_MODULE_PATH}
+  "${CMAKE_SOURCE_DIR}/contrib/cmake/check/"
+  "${CMAKE_SOURCE_DIR}/contrib/cmake/configure/"
+  "${CMAKE_SOURCE_DIR}/contrib/cmake/macros/"
+  "${CMAKE_SOURCE_DIR}/contrib/cmake/modules/"
+  )
+
+
+
+
+#
+# Set up deal.II specific variables
+#
+
+SET(DEAL_II_PACKAGE_BUGREPORT "dealii@dealii.org")
+SET(DEAL_II_PACKAGE_NAME "deal.II")
+SET(DEAL_II_PACKAGE_TARNAME ${DEAL_II_PACKAGE_NAME})
+SET(DEAL_II_PACKAGE_VERSION ${VERSION})
+SET(DEAL_II_PACKAGE_STRING "${DEAL_II_PACKAGE_NAME} ${DEAL_II_PACKAGE_VERSION}")
+SET(DEAL_II_PACKAGE_URL "")
+STRING(REGEX REPLACE "^([0-9]+)\\..*" "\\1" DEAL_II_MAJOR "${VERSION}")
+STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_MINOR "${VERSION}")
+SET(DEAL_II_PATH ${CMAKE_INSTALL_PREFIX})
 
 
 
+#TODO:
+SET(CMAKE_CXX_FLAGS "-Wfatal-errors -D_REENTRANT -fPIC -O2 -march=native")
+SET(CMAKE_C_FLAGS "-Wfatal-errors -D_REENTRANT -fPIC -O2 -march=native")
+
+
 #
 # Now, configure a lot of things:
 #
@@ -157,7 +173,7 @@ ADD_CUSTOM_TARGET(deal_ii_target_dependencies)
 # 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 "")
+SET(deal_ii_required_linker_flags "")
 
 
 
@@ -236,4 +252,3 @@ INCLUDE(macro_expand_instantiations)
 ADD_SUBDIRECTORY(include)
 
 ADD_SUBDIRECTORY(source)
-
index 9bfd63ef2840ff590c59ee1cab68fca53191b62c..8f87d5bf134efb6ead0b6b24e3edb032ab0f3a89 100644 (file)
@@ -2,6 +2,10 @@ Next steps:
 
 * Add the CFLAGS and CXXFLAGS magic. (With an option to overwrite for distribution packaging.)
 
+* DEAL_II_DEPRECATED is not used at all...
+
+* Sanitize the building of the shared library. (At least for Linux...)
+
 * Add Bug tests.
 
 * HDF5
index c0881018db437c3d1c8b21c8e96fdf137a7c2f84..79b8ab1b6f2bc7a6cfdcfffbd6621d00033ac94d 100644 (file)
@@ -2,7 +2,7 @@ FIND_PACKAGE(MPI REQUIRED CXX)
 
 INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
 
-LIST(APPEND deal_II_required_linker_flags ${MPI_CXX_LINK_FLAGS})
+# LIST(APPEND deal_ii_required_linker_flags ${MPI_CXX_LINK_FLAGS}) # TODO
 LIST(APPEND deal_ii_external_libraries ${MPI_CXX_LIBRARIES})
 LIST(APPEND deal_ii_external_debug_libraries ${MPI_CXX_LIBRARIES})
 
index 73b33ecbe92e4888c6d98fb57bb3e0cabb052052..ddf986f3c13a6c5f2955f4c84877e13a5d6cbed4 100644 (file)
@@ -40,7 +40,7 @@ ELSE()
 
   INCLUDE_DIRECTORIES(${Umfpack_INCLUDE_DIR} ${AMD_INCLUDE_DIR})
 
-  LIST(APPEND deal_II_required_linker_flags
+  LIST(APPEND deal_ii_required_linker_flags
     ${BLAS_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}
     )
 
index e6c1a0bdd990dc37120e403cdf258b9dfd1a8291..9f1adec80e70a5636b8d254fdf4e03bf118b228a 100644 (file)
 
 
 
+/* Backward compatibility support for functions and classes that do not take
+   an explicit mapping variable, but rather use a default Q1 mapping instead
+   */
+#cmakedefine DEAL_II_COMPAT_MAPPING
+
+
+
 
 /*
  * Configured in configure_boost.cmake:
    libstdc++ interface. */
 #cmakedefine HAVE_LIBSTDCXX_DEMANGLER
 
-  SET(DEAL_II_DEPRECATED TRUE)
-
 /* Equal to 0 in the generic case, equal to 1 if CPU compiled for supports
    SSE2, equal to 2 if CPU compiled for supports AVX */
 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL @DEAL_II_COMPILER_VECTORIZATION_LEVEL@
index 6ce0d15cfae0367e6cf70f3c44677a196147f567..a0b43ac677ec5f15f45c85e0184639e3a35039b4 100644 (file)
    provided by the compiler. */
 #cmakedefine DEAL_II_USE_DIRECT_ERRNO_H
 
-/* Backward compatibility support for functions and classes that do not take
-   an explicit mapping variable, but rather use a default Q1 mapping instead
-   */
-#cmakedefine DEAL_II_COMPAT_MAPPING
-
 /* Defined if the compiler has a bug in deducing the type of pointers to const
    member functions. */
 #cmakedefine DEAL_II_CONST_MEMBER_DEDUCTION_BUG
index b9d3d6dc78b846d1a391775c7685fddec21bcdcc..2024a9dc7e49b714114a3ddc71e1589178d5a10e 100644 (file)
@@ -1,3 +1,10 @@
+#
+# Compile the deal.II library
+#
+
+#
+# Each subdirectory specifies an OBJECT target:
+#
 ADD_SUBDIRECTORY(base)
 ADD_SUBDIRECTORY(distributed)
 ADD_SUBDIRECTORY(dofs)
@@ -8,6 +15,10 @@ ADD_SUBDIRECTORY(lac)
 ADD_SUBDIRECTORY(multigrid)
 ADD_SUBDIRECTORY(numerics)
 
+#
+# Combine all OBJECT targets to a shared library:
+#
+
 ADD_LIBRARY(deal_II SHARED
  $<TARGET_OBJECTS:obj_base>
  $<TARGET_OBJECTS:obj_distributed>
@@ -18,5 +29,18 @@ ADD_LIBRARY(deal_II SHARED
  $<TARGET_OBJECTS:obj_lac>
  $<TARGET_OBJECTS:obj_multigrid>
  $<TARGET_OBJECTS:obj_numerics>
+
+ # for contrib stuff:
  ${deal_ii_additional_object_files}
  )
+
+#
+# Link all external libraries into the target:
+# TODO: toggle for as-needed
+#
+
+IF (CMAKE_BUILD_TYPE MATCHES "debug")
+  TARGET_LINK_LIBRARIES(deal_II ${deal_ii_required_linker_flags} ${deal_ii_external_debug_libraries})
+ELSE()
+  TARGET_LINK_LIBRARIES(deal_II ${deal_ii_required_linker_flags} ${deal_ii_external_libraries})
+ENDIF()

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.