]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Am I drunk??
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Mar 2013 17:46:45 +0000 (17:46 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Mar 2013 17:46:45 +0000 (17:46 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@28761 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/GNUmakefile [deleted file]
deal.II/source/CMakeLists.txt [new file with mode: 0644]

diff --git a/deal.II/examples/GNUmakefile b/deal.II/examples/GNUmakefile
deleted file mode 100644 (file)
index f5a1989..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# GNUmakefile has priority over Makefile for GNU Make.
-# So if a Makefile was generated by CMake due to an in-source configure
-# chain-load it:
-#
-ifneq ($(wildcard Makefile),)
-  include Makefile
-else
-  default:
-endif
-
-steps:= $(wildcard step-*)
-
-%/Makefile:
-       -cd $(@D) && cmake . > configure.log 2>&1
-
-.PHONY: configure_examples
-configure_examples: $(steps:%=%/Makefile)
-
-%/%: %/Makefile
-       cd $(@D) && if [ -f Makefile ]; then (make > build.log 2>&1); fi
-
-.PHONY: build_examples
-build_examples: $(steps:%=%/%)
-
-%/OK: %/%
-       cd $(@D) && if [ -f Makefile ]; then (make run > run.log 2>&1); fi && touch OK
-
-.PHONY: run_examples
-run_examples: $(steps:%=%/OK)
-
diff --git a/deal.II/source/CMakeLists.txt b/deal.II/source/CMakeLists.txt
new file mode 100644 (file)
index 0000000..5cf01b0
--- /dev/null
@@ -0,0 +1,94 @@
+#####
+##
+## Copyright (C) 2012, 2013 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## <TODO: Full License information>
+## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
+## version of the LGPL license.
+##
+## Author: Matthias Maier <matthias.maier@iwr.uni-heidelberg.de>
+##
+#####
+
+#
+# Compile the deal.II library
+#
+
+INCLUDE_DIRECTORIES(
+  ${CMAKE_BINARY_DIR}/include/
+  ${CMAKE_SOURCE_DIR}/include/
+  )
+
+#
+# List the directories where we have source files. the ones with the longest
+# compile jobs come first so that 'make -j N' saturates many processors also
+# towards the end of compiling rather than having to wait for one long
+# compilation that, because it has been listed last, is started towards the
+# end of everything (e.g. numerics/vectors.cc takes several minutes to
+# compile...)
+#
+ADD_SUBDIRECTORY(numerics)
+ADD_SUBDIRECTORY(fe)
+ADD_SUBDIRECTORY(dofs)
+ADD_SUBDIRECTORY(lac)
+ADD_SUBDIRECTORY(base)
+ADD_SUBDIRECTORY(grid)
+ADD_SUBDIRECTORY(hp)
+ADD_SUBDIRECTORY(multigrid)
+ADD_SUBDIRECTORY(distributed)
+
+
+FOREACH(build ${DEAL_II_BUILD_TYPES})
+  STRING(TOLOWER ${build} build_lowercase)
+
+  #
+  # Combine all ${build} OBJECT targets to a ${build} library:
+  #
+  FILE(STRINGS
+    ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_objects_${build_lowercase}
+    deal_ii_objects_${build_lowercase}
+    )
+  ADD_LIBRARY(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+    ${deal_ii_objects_${build_lowercase}}
+    )
+
+  SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+    PROPERTIES
+    VERSION ${VERSION}
+    #
+    # Sonaming: Well... we just use the version number.
+    # No point to wrack one's brain over the question whether a new version of
+    # a C++ library is still ABI backwards compatible :-]
+    #
+    SOVERSION ${VERSION}
+    LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_${build}}"
+    COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${build}}"
+    COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${build}}"
+    )
+
+  TARGET_LINK_LIBRARIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+    ${DEAL_II_EXTERNAL_LIBRARIES}
+    ${DEAL_II_EXTERNAL_LIBRARIES_${build}}
+    )
+
+  INSTALL(TARGETS ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+    EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
+    DESTINATION ${DEAL_II_LIBRARY_RELDIR}
+    COMPONENT library
+    )
+
+  #
+  # Information for legacy Make.global_options
+  #
+  GET_TARGET_PROPERTY(lib ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX} LOCATION)
+  GET_FILENAME_COMPONENT(lib "${lib}" NAME)
+  SET(MAKEFILE_LIBRARY_${build} "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}/${lib}" PARENT_SCOPE)
+
+ENDFOREACH()
+
+INSTALL(EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
+  DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
+  COMPONENT library
+  )

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.