From 10ee5520ab8f26f421cc31dbb855f3f39b4bc00f Mon Sep 17 00:00:00 2001 From: maier Date: Mon, 1 Oct 2012 13:16:23 +0000 Subject: [PATCH] Cleanup git-svn-id: https://svn.dealii.org/branches/branch_cmake@26903 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/CMakeLists.txt | 1 + deal.II/README.CMAKE | 8 ++--- deal.II/TODO.CMAKE | 7 +++++ .../cmake/configure/configure_trilinos.cmake | 5 ---- deal.II/cmake/configure/configure_zlib.cmake | 4 +++ deal.II/cmake/setup_custom_targets.cmake | 18 ++++-------- deal.II/cmake/setup_deal_ii.cmake | 6 ++++ deal.II/contrib/CMakeLists.txt | 4 +++ .../contrib/mesh_conversion/CMakeLists.txt | 11 +++++++ deal.II/contrib/mesh_conversion/Makefile | 29 ------------------- deal.II/contrib/parameter_gui/CMakeLists.txt | 0 11 files changed, 43 insertions(+), 50 deletions(-) create mode 100644 deal.II/contrib/CMakeLists.txt create mode 100644 deal.II/contrib/mesh_conversion/CMakeLists.txt delete mode 100755 deal.II/contrib/mesh_conversion/Makefile create mode 100644 deal.II/contrib/parameter_gui/CMakeLists.txt diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt index fc3311629c..24b272b317 100644 --- a/deal.II/CMakeLists.txt +++ b/deal.II/CMakeLists.txt @@ -122,6 +122,7 @@ IF(DEAL_II_WITH_DOC_DIRECTORY) ADD_SUBDIRECTORY(doc) ENDIF() ADD_SUBDIRECTORY(examples) +ADD_SUBDIRECTORY(contrib) # # Define some custom targets for convenience diff --git a/deal.II/README.CMAKE b/deal.II/README.CMAKE index fc1f05fc7e..255d218eb8 100644 --- a/deal.II/README.CMAKE +++ b/deal.II/README.CMAKE @@ -297,6 +297,10 @@ CONFIGURATION The following options control which components of deal.II will be configured, build and installed: + DEAL_II_COMPONENT_CONTRIB + Enable configuration and installation of the programs under contrib + This adds a COMPONENT "contrib" to the build system. + DEAL_II_COMPONENT_COMPAT_FILES: Enable installation of legacy files and tools for compatibility with the old build system @@ -310,10 +314,6 @@ CONFIGURATION Enable configuration and installation of the example steps. This adds a COMPONENT "examples" to the build system. - DEAL_II_COMPONENT_CONTRIB - Enable configuration and installation of the programs under contrib - This adds a COMPONENT "contrib" to the build system. - diff --git a/deal.II/TODO.CMAKE b/deal.II/TODO.CMAKE index 4420919578..564a9d2285 100644 --- a/deal.II/TODO.CMAKE +++ b/deal.II/TODO.CMAKE @@ -27,6 +27,13 @@ Major: * Port the testsuite to cmake +* Build system for parameter_gui. + +* Finish install targets: + + - share files (documentation/manpage/etc.) + - same for mesh_conversion and parameter_gui + * Rename all DEAL_II_USE_* and HAVE_LIB* that refer to a feature to DEAL_II_WITH_*. diff --git a/deal.II/cmake/configure/configure_trilinos.cmake b/deal.II/cmake/configure/configure_trilinos.cmake index 29039553ef..91dd3ce147 100644 --- a/deal.II/cmake/configure/configure_trilinos.cmake +++ b/deal.II/cmake/configure/configure_trilinos.cmake @@ -16,7 +16,6 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) # SET(${var} TRUE) - # # Check whether all required modules of trilinos are installed: # @@ -46,7 +45,6 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) ) ENDIF() - # # Trilinos 10.6 had quite a number of bugs we ran into, see # for example @@ -62,7 +60,6 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) SET(${var} FALSE) ENDIF() - # # The same is unfortunately true for 10.8.[01]: # https://software.sandia.gov/bugzilla/show_bug.cgi?id=5370 @@ -78,7 +75,6 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) SET(${var} FALSE) ENDIF() - # # Trilinos has to be configured with the same MPI configuration as # deal.II. @@ -100,7 +96,6 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) SET(${var} FALSE) ENDIF() - # # Some verions of Sacado_cmath.hpp does things that aren't compatible # with the -std=c++0x flag of GCC, see deal.II FAQ. diff --git a/deal.II/cmake/configure/configure_zlib.cmake b/deal.II/cmake/configure/configure_zlib.cmake index f0e4f3f81b..d9fe051c80 100644 --- a/deal.II/cmake/configure/configure_zlib.cmake +++ b/deal.II/cmake/configure/configure_zlib.cmake @@ -2,6 +2,10 @@ # Configuration for the zlib library: # +OPTION(DEAL_II_WITH_ZLIB + "Build deal.II with support for zlib." + OFF) + MACRO(FEATURE_ZLIB_FIND_EXTERNAL var) FIND_PACKAGE(ZLIB) diff --git a/deal.II/cmake/setup_custom_targets.cmake b/deal.II/cmake/setup_custom_targets.cmake index 7cfd2be836..ed33d63399 100644 --- a/deal.II/cmake/setup_custom_targets.cmake +++ b/deal.II/cmake/setup_custom_targets.cmake @@ -17,30 +17,24 @@ FOREACH(build ${DEAL_II_BUILD_TYPES}) ADD_DEPENDENCIES(library ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}) ENDFOREACH() - IF(DEAL_II_COMPONENT_DOCUMENTATION) - ADD_CUSTOM_TARGET(documentation) ADD_DEPENDENCIES(documentation doxygen) - ENDIF() - -IF(DEAL_II_COMPONENT_COMPAT_FILES) - +IF(DEAL_II_COMPONENT_COMPAT_FILES) ADD_CUSTOM_TARGET(compat_files) ADD_DEPENDENCIES(compat_files expand_instantiations make_dependencies report_features ) - ENDIF() - -IF(DEAL_II_COMPONENT_PROJECT_CONFIG) - - ADD_CUSTOM_TARGET(project_config) - +IF(DEAL_II_COMPONENT_CONTRIB) + ADD_CUSTOM_TARGET(contrib) + ADD_DEPENDENCIES(contrib + mesh_conversion + ) ENDIF() diff --git a/deal.II/cmake/setup_deal_ii.cmake b/deal.II/cmake/setup_deal_ii.cmake index 7815e7e633..ab48a06d2b 100644 --- a/deal.II/cmake/setup_deal_ii.cmake +++ b/deal.II/cmake/setup_deal_ii.cmake @@ -10,6 +10,7 @@ # DEAL_II_ALLOW_BUNDLED **) # DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS **) # DEAL_II_COMPONENT_COMPAT_FILES **) +# DEAL_II_COMPONENT_CONTRIB **) # DEAL_II_COMPONENT_DOCUMENTATION **) # DEAL_II_COMPONENT_EXAMPLES **) # @@ -105,6 +106,11 @@ OPTION(DEAL_II_COMPONENT_COMPAT_FILES ON ) +OPTION(DEAL_II_COMPONENT_CONTRIB + "Enable installation of contrib packages. This adds a COMPONENT \"contrib\" to the build system." + ON + ) + OPTION(DEAL_II_COMPONENT_EXAMPLES "Enable configuration and installation of the example steps. This adds a COMPONENT \"examples\" to the build system." ON diff --git a/deal.II/contrib/CMakeLists.txt b/deal.II/contrib/CMakeLists.txt new file mode 100644 index 0000000000..fe91b602a1 --- /dev/null +++ b/deal.II/contrib/CMakeLists.txt @@ -0,0 +1,4 @@ +IF(DEAL_II_COMPONENT_CONTRIB) + ADD_SUBDIRECTORY(mesh_conversion) + ADD_SUBDIRECTorY(parameter_gui) +ENDIF() diff --git a/deal.II/contrib/mesh_conversion/CMakeLists.txt b/deal.II/contrib/mesh_conversion/CMakeLists.txt new file mode 100644 index 0000000000..477b261237 --- /dev/null +++ b/deal.II/contrib/mesh_conversion/CMakeLists.txt @@ -0,0 +1,11 @@ +ADD_EXECUTABLE(mesh_conversion + Main.cc + MeshConversion.cc + ) + +INSTALL(TARGETS mesh_conversion + RUNTIME + DESTINATION ${DEAL_II_EXECUTABLE_RELDIR} + COMPONENT contrib + ) + diff --git a/deal.II/contrib/mesh_conversion/Makefile b/deal.II/contrib/mesh_conversion/Makefile deleted file mode 100755 index 319087f5dc..0000000000 --- a/deal.II/contrib/mesh_conversion/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -SHELL = /bin/sh - -#MACROS -CPP = g++ -g -ansi -pedantic -Wall -PROG = convert_mesh - -#SUFFIX RULES -.SUFFIXES: .o .cc -.cc.o: - $(CPP) -c $< - -all: $(PROG) - -$(PROG): Main.o MeshConversion.o - $(CPP) -o $(PROG) Main.o MeshConversion.o -Main.o: Main.cc MeshConversion.o -MeshConversion.o: MeshConversion.cc - -clean: - @echo "-------------------------------------------------" - @echo "REMOVING EXECUTABLES, *.o, a.out AND FILE BACKUPS" - -rm -f ${PROG} *.o *.*~ makefile~ *~ - @echo "-------------------------------------------------" - -clean-temp: - @echo "-------------------------------------------------" - @echo "REMOVING EXECUTABLES, *.o, a.out AND FILE BACKUPS" - -rm -f *.o *.*~ makefile~ *~ - @echo "-------------------------------------------------" diff --git a/deal.II/contrib/parameter_gui/CMakeLists.txt b/deal.II/contrib/parameter_gui/CMakeLists.txt new file mode 100644 index 0000000000..e69de29bb2 -- 2.39.5