From: Matthias Maier Date: Sun, 11 Jan 2015 15:50:45 +0000 (+0100) Subject: Remove component COMPAT_FILES X-Git-Tag: v8.3.0-rc1~531^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=761bb4a81d2cc5157f671e64bdf5d692b327c2ee;p=dealii.git Remove component COMPAT_FILES --- diff --git a/cmake/config/CMakeLists.txt b/cmake/config/CMakeLists.txt index e457629e05..03e544b6b7 100644 --- a/cmake/config/CMakeLists.txt +++ b/cmake/config/CMakeLists.txt @@ -16,7 +16,6 @@ # # This file sets up the project configuration consisting of # -# Make.global_options (legacy) # deal.IIConfig.cmake # deal.IIVersionConfig.cmake # @@ -32,7 +31,7 @@ MESSAGE(STATUS "Setting up project configuration") # CONFIGURE_FILE( # for binary dir: ${CMAKE_CURRENT_SOURCE_DIR}/template-arguments.in - ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/template-arguments + ${CMAKE_BINARY_DIR}/${DEAL_II_SHARE_RELDIR}/template-arguments ) @@ -210,178 +209,4 @@ FOREACH(var ${res}) ENDIF() ENDFOREACH() - -######################################################################## -# # -# Configure and install the old Makefile configuration: # -# # -######################################################################## - -IF(DEAL_II_COMPONENT_COMPAT_FILES) - # - # Transform some cmake lists into a string that the old Makefile - # mechanism actually understands: - # - - FOREACH(build ${DEAL_II_BUILD_TYPES}) - - TO_STRING_AND_ADD_PREFIX(MAKEFILE_DEFINITIONS_${build} - "-D" - ${DEAL_II_USER_DEFINITIONS} - ${DEAL_II_USER_DEFINITIONS_${build}} - ) - - # - # Ideally, DEAL_II_EXTERNAL_LIBRARIES should just contain a list of - # full library paths. Nevertheless, filter out all elements that are - # not a full path starting with "/" or that happen to be a "framework" - # - we won't deal with that in Make.global_options. - # - - SET(_libs) - FOREACH(_lib - ${DEAL_II_LIBRARIES_${build}} - ${DEAL_II_LIBRARIES} - ) - IF(_lib MATCHES "^\\s*\\/" AND NOT _lib MATCHES "\\.framework$") - LIST(APPEND _libs "${_lib}") - ENDIF() - ENDFOREACH() - - TO_STRING(MAKEFILE_TARGETS_${build} - $(D)/${DEAL_II_LIBRARY_RELDIR}/${CONFIG_LIBRARY_${build}} - ${_libs} - ) - - SET(_paths) - FOREACH(_lib - $(D)/${DEAL_II_LIBRARY_RELDIR}/${CONFIG_LIBRARY_${build}} - ${DEAL_II_LIBRARIES_${build}} - ${DEAL_II_LIBRARIES} - ) - - # - # Strip leading and trailing whitespace - # - STRING(STRIP "${_lib}" _lib) - - IF(_lib MATCHES "^\\/.*\\.framework$") - # - # We have a MacOSX framework - # - # TODO: What do? - # - - ELSEIF(_lib MATCHES "^(\\/|\\$\\(D\\))") - # - # Full path: /path/to/libfoo.(so|dylib|etc): - # - - # Extract library paths: - GET_FILENAME_COMPONENT(_path ${_lib} PATH) - LIST(APPEND _paths ${_path}) - - LIST(APPEND MAKEFILE_LIBS_${build} ${_lib}) - - ELSEIF(_lib MATCHES "^-l") - # - # Library is of the form "-lfoo": - # - LIST(APPEND MAKEFILE_LIBS_${build} ${_lib}) - - ELSEIF(NOT _lib MATCHES "^\\s*$" AND NOT _lib MATCHES "\\.so(\\.[0-9]+)*$") - # - # Well in this case we just assume that we have to append a "-l" - # - - LIST(APPEND MAKEFILE_LIBS_${build} "-l${_lib}") - - ELSE() - # - # For now, ignore the rest. - # - # TODO: What do? - # - ENDIF() - - ENDFOREACH() - - # - # And build up an rpath: - # - SET(_rpath "") - LIST(REMOVE_DUPLICATES _paths) - FOREACH(_path ${_paths}) - SET(_rpath "${_rpath} -Wl,-rpath,${_path}") - ENDFOREACH() - - TO_STRING(MAKEFILE_LIBS_${build} ${MAKEFILE_LIBS_${build}} ${_rpath}) - - # - # Set up our linker flags: - # - SET(MAKEFILE_LDFLAGS_${build} - "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}} ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${build}}" - ) - ENDFOREACH() - - # - # Boilerplate: The Make.global_options expects variables to be set to - # yes, as is common for Makefiles. - # - COND_SET_TO_YES(DEAL_II_WITH_THREADS MAKEFILE_enablethreads) - COND_SET_TO_YES(DEAL_II_WITH_MUPARSER MAKEFILE_enableparser) - COND_SET_TO_YES(BUILD_SHARED_LIBS MAKEFILE_enableshared) - - COND_SET_TO_YES(DEAL_II_WITH_ARPACK MAKEFILE_ARPACK) - COND_SET_TO_YES(DEAL_II_WITH_BLAS MAKEFILE_BLAS) - COND_SET_TO_YES(DEAL_II_WITH_HDF5 MAKEFILE_HDF5) - COND_SET_TO_YES(DEAL_II_WITH_LAPACK MAKEFILE_LAPACK) - COND_SET_TO_YES(DEAL_II_WITH_METIS MAKEFILE_METIS) - COND_SET_TO_YES(DEAL_II_WITH_MPI MAKEFILE_MPI) - COND_SET_TO_YES(DEAL_II_WITH_OPENCASCADE MAKEFILE_OPENCASCADE) - COND_SET_TO_YES(DEAL_II_WITH_P4EST MAKEFILE_P4EST) - COND_SET_TO_YES(DEAL_II_WITH_PETSC MAKEFILE_PETSC) - COND_SET_TO_YES(DEAL_II_WITH_SLEPC MAKEFILE_SLEPC) - COND_SET_TO_YES(DEAL_II_WITH_TRILINOS MAKEFILE_TRILINOS) - COND_SET_TO_YES(DEAL_II_WITH_UMFPACK MAKEFILE_UMFPACK) - - # - # For binary dir: - # - SET(MAKEFILE_D ${CMAKE_BINARY_DIR}) - TO_STRING_AND_ADD_PREFIX(MAKEFILE_INCLUDE_DIRS "${CMAKE_INCLUDE_FLAG_CXX}" - $(D)/install - $(D)/install/deal.II - ${CMAKE_SOURCE_DIR}/include/ - ${CMAKE_SOURCE_DIR}/include/deal.II - ${DEAL_II_BUNDLED_INCLUDE_DIRS} - ${DEAL_II_USER_INCLUDE_DIRS} - ) - CONFIGURE_FILE( - ${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in - ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/Make.global_options - ) - # - # For installation: - # - SET(MAKEFILE_D ${CMAKE_INSTALL_PREFIX}) - TO_STRING_AND_ADD_PREFIX(MAKEFILE_INCLUDE_DIRS "${CMAKE_INCLUDE_FLAG_CXX}" - $(D)/${DEAL_II_INCLUDE_RELDIR} - $(D)/${DEAL_II_INCLUDE_RELDIR}/deal.II - $(D)/${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled - ${DEAL_II_USER_INCLUDE_DIRS} - ) - CONFIGURE_FILE( - ${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in - ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options - ) - INSTALL(FILES - ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/template-arguments - ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options - DESTINATION ${DEAL_II_COMMON_RELDIR} - COMPONENT compat_files - ) -ENDIF() - MESSAGE(STATUS "Setting up project configuration - Done") diff --git a/cmake/config/Config.cmake.in b/cmake/config/Config.cmake.in index 81744120dd..184fc8d9a3 100644 --- a/cmake/config/Config.cmake.in +++ b/cmake/config/Config.cmake.in @@ -46,7 +46,7 @@ SET(DEAL_II_BUILD_TYPES "@DEAL_II_BUILD_TYPES@") # SET(DEAL_II_CMAKE_MACROS_RELDIR "@DEAL_II_CMAKE_MACROS_RELDIR@") -SET(DEAL_II_COMMON_RELDIR "@DEAL_II_COMMON_RELDIR@") +SET(DEAL_II_SHARE_RELDIR "@DEAL_II_SHARE_RELDIR@") SET(DEAL_II_DOCREADME_RELDIR "@DEAL_II_DOCREADME_RELDIR@") SET(DEAL_II_DOCHTML_RELDIR "@DEAL_II_DOCHTML_RELDIR@") SET(DEAL_II_EXAMPLES_RELDIR "@DEAL_II_EXAMPLES_RELDIR@") diff --git a/cmake/config/Make.global_options.in b/cmake/config/Make.global_options.in deleted file mode 100644 index aa3290857b..0000000000 --- a/cmake/config/Make.global_options.in +++ /dev/null @@ -1,98 +0,0 @@ -## --------------------------------------------------------------------- -## -## Copyright (C) 2012 - 2015 by the deal.II authors -## -## This file is part of the deal.II library. -## -## The deal.II library is free software; you can use it, redistribute -## it, and/or modify it under the terms of the GNU Lesser General -## Public License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## The full text of the license can be found in the file LICENSE at -## the top level of the deal.II distribution. -## -## --------------------------------------------------------------------- - - -# -# Please note: -# -# This is a compatibility Make.global_options file generated by CMake -# from the ./cmake/config/Make.global_options.in file. -# - - -D = @MAKEFILE_D@ - -CXX = @CMAKE_CXX_COMPILER@ -CXX-ID = @CMAKE_CXX_COMPILER_ID@ -CXX-VERSION = @CMAKE_CXX_COMPILER_VERSION@ -SHLIBLD = @CMAKE_CXX_COMPILER@ -SHLIBFLAGS = @CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS@ - -ifeq ($(debug-mode), on) - LDFLAGS = @MAKEFILE_LDFLAGS_DEBUG@ - LIBS = @MAKEFILE_LIBS_DEBUG@ -else - LDFLAGS = @MAKEFILE_LDFLAGS_RELEASE@ - LIBS = @MAKEFILE_LIBS_RELEASE@ -endif - -LIBDIR = $(D)/@DEAL_II_LIBRARY_RELDIR@ - -enable-threads = @MAKEFILE_enablethreads@ -enable-shared = @MAKEFILE_enableshared@ -enable-parser = @MAKEFILE_enableparser@ -DEAL_II_VERSION = @DEAL_II_PACKAGE_VERSION@ -DEAL_II_MAJOR = @DEAL_II_VERSION_MAJOR@ -DEAL_II_MINOR = @DEAL_II_VERSION_MINOR@ -DEAL_II_SUBMINOR = @DEAL_II_VERSION_SUBMINOR@ - -PERL = perl - - -USE_CONTRIB_PETSC = @MAKEFILE_PETSC@ -USE_CONTRIB_SLEPC = @MAKEFILE_SLEPC@ -USE_CONTRIB_TRILINOS = @MAKEFILE_TRILINOS@ -USE_CONTRIB_HDF5 = @MAKEFILE_HDF5@ -USE_CONTRIB_BLAS = @MAKEFILE_BLAS@ -USE_CONTRIB_LAPACK = @MAKEFILE_LAPACK@ -USE_CONTRIB_ARPACK = @MAKEFILE_ARPACK@ -USE_CONTRIB_METIS = @MAKEFILE_METIS@ -USE_CONTRIB_UMFPACK = @MAKEFILE_UMFPACK@ -USE_CONTRIB_P4EST = @MAKEFILE_P4EST@ -USE_CONTRIB_OPENCASCADE = @MAKEFILE_OPENCASCADE@ -DEAL_II_USE_MPI = @MAKEFILE_MPI@ - -OBJEXT = o -EXEEXT = - -shared-lib-suffix = .so -static-lib-suffix = .a - -ifeq ($(enable-shared),yes) - lib-suffix = $(shared-lib-suffix) -else - lib-suffix = $(static-lib-suffix) -endif - - -# set paths to all the libraries we need: -lib-deal2.o = @MAKEFILE_TARGETS_RELEASE@ -lib-deal2.g = @MAKEFILE_TARGETS_DEBUG@ - - -# Include paths as command line flags -INCLUDE = @MAKEFILE_INCLUDE_DIRS@ - - -# compiler flags for debug and optimized mode -CXXFLAGS.g = @DEAL_II_CXX_FLAGS@ @DEAL_II_CXX_FLAGS_DEBUG@ @MAKEFILE_DEFINITIONS@ @MAKEFILE_DEFINITIONS_DEBUG@ $(INCLUDE) -CXXFLAGS.o = @DEAL_II_CXX_FLAGS@ @DEAL_II_CXX_FLAGS_RELEASE@ @MAKEFILE_DEFINITIONS@ @MAKEFILE_DEFINITIONS_RELEASE@ $(INCLUDE) - -ifeq ($(enable-threads),yes) - MT = MT -else - MT = == -endif - diff --git a/cmake/cpack-mac-bundle/dealii-terminal.in b/cmake/cpack-mac-bundle/dealii-terminal.in index 383755815f..67b881832c 100755 --- a/cmake/cpack-mac-bundle/dealii-terminal.in +++ b/cmake/cpack-mac-bundle/dealii-terminal.in @@ -53,7 +53,7 @@ fi # Everything seems to be okay. Launch a terminal with PATH's # set up to work with deal.II. -CONF=$DEAL_II_RESOURCES/@DEAL_II_COMMON_RELDIR@/dealii.conf +CONF=$DEAL_II_RESOURCES/@DEAL_II_SHARE_RELDIR@/dealii.conf if ! [[ -f $CONF ]]; then return=`/usr/bin/osascript < ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file} ) diff --git a/cmake/scripts/CMakeLists.txt b/cmake/scripts/CMakeLists.txt index 3da2440022..03f5bfbddd 100644 --- a/cmake/scripts/CMakeLists.txt +++ b/cmake/scripts/CMakeLists.txt @@ -1,6 +1,6 @@ ## --------------------------------------------------------------------- ## -## Copyright (C) 2012 - 2014 by the deal.II authors +## Copyright (C) 2012 - 2015 by the deal.II authors ## ## This file is part of the deal.II library. ## @@ -14,30 +14,7 @@ ## --------------------------------------------------------------------- ADD_EXECUTABLE(expand_instantiations_exe expand_instantiations.cc) -SET_TARGET_PROPERTIES(expand_instantiations_exe - PROPERTIES OUTPUT_NAME expand_instantiations +SET_TARGET_PROPERTIES(expand_instantiations_exe PROPERTIES + OUTPUT_NAME expand_instantiations + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR} ) - -IF(DEAL_II_COMPONENT_COMPAT_FILES) - MESSAGE(STATUS "Setting up compat_files") - - # - # Also build and install the old dependency_resolution executable: - # - - ADD_EXECUTABLE(make_dependencies make_dependencies.cc) - - ADD_DEPENDENCIES(compat_files - expand_instantiations_exe - make_dependencies - ) - - SET_TARGET_PROPERTIES(expand_instantiations_exe make_dependencies - PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/scripts - ) - INSTALL(TARGETS expand_instantiations_exe make_dependencies - DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts - COMPONENT compat_files - ) - MESSAGE(STATUS "Setting up compat_files - Done") -ENDIF() diff --git a/cmake/scripts/make_dependencies.cc b/cmake/scripts/make_dependencies.cc deleted file mode 100644 index 83ba9c433e..0000000000 --- a/cmake/scripts/make_dependencies.cc +++ /dev/null @@ -1,416 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2003 - 2014 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE at -// the top level of the deal.II distribution. -// -// --------------------------------------------------------------------- - - -// Make a dependency file tree -// usage: make_depencies -Iinc_path1 -Iinc_path2 ... -Bbasepath files - -// This program is basically a replacement for something like "gcc -// -M", i.e. it generates for each input file a list of other files it -// depends on by direct or indirect inclusion (or at least those files -// that can be found in the directories specified by -I/path/.../ -// flags on the command line). The difference to gcc -M is that it is -// much faster, since it doesn't really do much parsing except for -// finding those lines that have a #include at the beginning -// -// The output looks like this: -// -// $basepath/.o-file $basepath/.g.o-file: file included_files -// -// $basepath is the dir where the object files are to be placed (as -// given by the -B parameter to this script). if no path is given, no -// path is printed. if one is given, a slash is appended if necessary - -// If the -n (for "new-style") flag is passed, then the output format -// $basepath/optimized/.o-file $basepath/debug/.o-file: file included_files -// is used. - -// Author: Wolfgang Bangerth, 2003 (and based on a previous perl -// script written 1998, 1999, 2000, 2001, 2002) - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// base path for object files, including trailing slash if non-empty -std::string basepath; - -// list of include directories -std::vector include_directories; - -// for each file that we ever visit, store the set of other files it -// includes directly -std::map > direct_includes; - -// A variable that stores whether we want old-style or new-style format -enum Format -{ - old_style, new_style -} format; - - -bool file_exists(const std::string &file) -{ - struct stat buf; - int error = stat (file.c_str(), &buf); - - return ((error == 0) && - ((buf.st_mode & S_IFMT) == S_IFREG)); -} - - -// for the given file, fill a respective entry in the "direct_includes" map -// listing the names of those files that are directly included -void determine_direct_includes (const std::string &file) -{ - // if this file has already been treated, then leave it at this - if (direct_includes.find (file) != direct_includes.end()) - return; - - // otherwise, open the file and go through it line by line to search for - // other includes. we will have to have the path to the present file - // later, so get it already here - std::string present_path; - if (file.find ('/') != std::string::npos) - present_path = std::string (file.begin(), - file.begin()+file.rfind ('/')+1); - - std::ifstream in(file.c_str()); - // If the file does not exist, for instance an ".inst" file which will be - // generated by make later, just return from this function. - // - // As a result, non-existing files are expected to have no dependencies. - if (! ((bool)in)) - return; - - std::string line; - while (in) - { - // get one line, eat whitespace at the beginning and see whether the - // first non-whitespace is a # character - getline (in, line); - unsigned int pos=0; - for (; pos')) - { - included_file = std::string (line.begin()+pos+1, - line.begin()+endpos); - break; - } - if (included_file.length() == 0) - { - std::cerr << "Include file name empty in file <" << file << "> line: " << std::endl - << line << std::endl; - std::abort(); - } - - - bool is_inst_file = - included_file.size()>5 - && (included_file.rfind(".inst") == (included_file.size()-5)); - - // .inst files are always relative to the current path. We need a - // special case, because they might not exist at this point and the - // next block checks the files for existence. - if (is_inst_file) - included_file = present_path+included_file; - - - // next try to locate the file in absolute paths. For includes of the - // form #include "...", we check the current path first. - if (included_file[0] != '/' && !is_inst_file) - { - bool is_relative_path = false; - if (line[pos] == '"' && file_exists(present_path+included_file)) - { - included_file = present_path+included_file; - is_relative_path = true; - } - - if (is_relative_path == false) - for (std::vector::const_iterator - include_dir=include_directories.begin(); - include_dir!=include_directories.end(); ++include_dir) - { - if (file_exists((*include_dir+included_file))) - { - included_file = *include_dir+included_file; - break; - } - } - } - - // make sure the file exists and that we can read from it, otherwise - // just ignore the line - - // If this is an ".inst" file, it will be generated by make later, so - // we better keep it on the list. - - if (line[pos] != '"' || !is_inst_file) - { - if (!file_exists(included_file)) - continue; - } - - - - // ok, so we did find an appropriate file. add it to the correct list - direct_includes[file].insert (included_file); - - // work on the include file recursively. note that the first line of - // this function saves us from infinite recursions in case of include - // loops - determine_direct_includes (included_file); - } -} - - - - -// return the set of all included files, directly or indirectly, for the -// given file. for this purpose, we consider the direct_includes variable -// to be a representation of a directed graph: given a file (a node in the -// graph), the elements of the include-set for this file are outgoing edges -// from this node. to get at all includes, direct and indirect, we keep a -// list starting with the direct includes, the collect all direct includes -// of the files in the list, then their include files, etc. We thus march -// in fronts through the graph. -// -// one of the complications we have to keep track of is that the graph may -// be cyclic (i.e. header files include each other mutually -- in the real -// program, one of the includes will be guarded by preprocessor #ifdefs, -// but we don't see them here), so we have to make sure we strip elements -// from the present front that we have already visited before -// -// this function could presumably be made more efficient in the following -// way: when we have more than one file for which we want to compute -// dependencies, we presently walk through the graph for each of them. -// however, they will likely have one or more includes in common, so they -// will also have parts of the dependency graph in common. if we could -// precompute the dependency graph for include files in advance, we -// wouldn't have to walk through _all_ the graph for each file we consider, -// but could just draw in blocks. the problem with that is that to make -// this efficient we cannot just compute the whole set of dependencies for -// _each_ file, but we have to do this on the fly and to avoid again -// problems with the cyclic nature we have to keep track where we are -// presently coming from. that's way too complicated for now and I leave it -// to times when dependency generation becomes again a noticable time hit -// -// one of the ideas to solve this problem would be to start at terminal -// nodes of the graph (i.e. nodes that have no outgoing edges) and fold -// these nodes into nodes that have only outgoing edges to terminal nodes. -// store the dependencies of these next-to-terminal nodes and remove the -// terminal ones. then start over again with the so generated graph. if we -// consider the files for which we want to compute dependency information -// as top level nodes (they will _only_ have outgoing nodes), we could -// presumable roll up the entire graph from the bottom (terminal nodes) and -// fold it one layer at a time -// -// in any case, there is presently no need for this since the actions of -// this function are presently not really time critical: parsing the files -// in the function above is a much bigger time-hit. -std::set -get_all_includes (const std::string &name) -{ - // start with direct includes - std::set all_includes = direct_includes[name]; - - std::set next_level_includes = all_includes; - while (true) - { - // traverse all next level includes and get their direct include - // files. the set makes sure that duplicates are removed - std::set second_next; - for (std::set::const_iterator - next=next_level_includes.begin(); - next!=next_level_includes.end(); ++next) - second_next.insert (direct_includes[*next].begin(), - direct_includes[*next].end()); - - // for each of them, if it hasn't been treated then add it to the - // files of the next level and later add it to the all_includes - next_level_includes.clear (); - for (std::set::const_iterator f=second_next.begin(); - f!=second_next.end(); ++f) - if (all_includes.find(*f) == all_includes.end()) - next_level_includes.insert (*f); - - // if no new includes found no more, then quit - if (next_level_includes.size() == 0) - return all_includes; - - // otherwise, copy over and start over on the next level of the tree - all_includes.insert (next_level_includes.begin(), - next_level_includes.end()); - } -} - - - -int main (int argc, char **argv) -{ - std::vector filenames; - - // parse all arguments (except the name of the executable itself) - for (unsigned int c=1; c(argc); ++c) - { - const std::string arg = argv[c]; - - // if string starts with -I, take this as an include path - if ((arg.length()>2) && (arg[0]=='-') && (arg[1]=='I')) - { - std::string dir (arg.begin()+2, arg.end()); - - // append a slash if not already there - if (dir[dir.length()-1] != '/') - dir += '/'; - - // drop initial ./ if this is there - if ((dir[0]=='.') && (dir[1]=='/')) - dir = std::string(dir.begin()+2, dir.end()); - - include_directories.push_back (dir); - } - // if string starts with -B, then this is the base name for object - // files - else if ((arg.length()>2) && (arg[0]=='-') && (arg[1]=='B')) - { - basepath = std::string(arg.begin()+2, arg.end()); - if (basepath[basepath.size()-1] != '/') - basepath += '/'; - } - // if string is -n, then use new-style format - else if ((arg.length()==2) && (arg[0]=='-') && (arg[1]=='n')) - format = new_style; - - // otherwise assume that this is one of the files for input - else - { - assert (arg.size()>=1); - assert (arg[0] != '-'); - - filenames.push_back (arg); - } - } - - // next iterate through all files and figure out which other files they - // include - for (std::vector::const_iterator file=filenames.begin(); - file != filenames.end(); ++file) - determine_direct_includes (*file); - - - // now we have all files that are directly or indirectly included into - // the files given on the command lines. for each of them, we have - // recorded which files they include themselves. for each file on the - // command line, we can thus form a complete include tree. - for (std::vector::const_iterator file=filenames.begin(); - file != filenames.end(); ++file) - { - // get base of filename by chipping away .cc extension as well as - // path - std::string basename; - if (file->find (".cc") != std::string::npos) - basename = std::string (file->begin(), - file->begin()+file->find (".cc")); - else if (file->find (".cpp") != std::string::npos) - basename = std::string (file->begin(), - file->begin()+file->find (".cpp")); - else - basename = *file; - - if (basename.rfind ("/") != std::string::npos) - basename = std::string (basename.begin()+basename.rfind("/")+1, - basename.end()); - - // get all direct and indirect includes for this file... - const std::set includes = get_all_includes (*file); - - // ...write the rule for the .o file... - if (format == old_style) - std::cout << basepath << basename << ".o: \\" - << std::endl - << "\t\t" << *file; - else - std::cout << basepath << "optimized/" << basename << ".o: \\" - << std::endl - << "\t\t" << *file; - for (std::set::const_iterator i=includes.begin(); - i!=includes.end(); ++i) - std::cout << "\\\n\t\t" << *i; - std::cout << std::endl; - - // ...and a similar rule for the .o file in debug mode - if (format == old_style) - std::cout << basepath << basename << ".g.o: \\" - << std::endl - << "\t\t" << *file; - else - std::cout << basepath << "debug/" << basename << ".o: \\" - << std::endl - << "\t\t" << *file; - for (std::set::const_iterator i=includes.begin(); - i!=includes.end(); ++i) - std::cout << "\\\n\t\t" << *i; - std::cout << std::endl; - } -} - diff --git a/cmake/setup_cached_variables.cmake b/cmake/setup_cached_variables.cmake index bdb1170e42..262a995a62 100644 --- a/cmake/setup_cached_variables.cmake +++ b/cmake/setup_cached_variables.cmake @@ -22,7 +22,6 @@ # # DEAL_II_ALLOW_AUTODETECTION # DEAL_II_ALLOW_BUNDLED -# DEAL_II_COMPONENT_COMPAT_FILES # DEAL_II_COMPONENT_DOCUMENTATION # DEAL_II_COMPONENT_EXAMPLES # DEAL_II_COMPONENT_MESH_CONVERTER @@ -73,11 +72,6 @@ If(DEAL_II_HAVE_BUNDLED_DIRECTORY) ) ENDIF() -OPTION(DEAL_II_COMPONENT_COMPAT_FILES - "Enable installation of the example steps. This adds a COMPONENT \"compat_files\" to the build system." - ON - ) - If(DEAL_II_HAVE_DOC_DIRECTORY) OPTION(DEAL_II_COMPONENT_DOCUMENTATION "Enable configuration, build and installation of the documentation. This adds a COMPONENT \"documentation\" to the build system." @@ -390,7 +384,7 @@ FOREACH(_var ${_res}) # # Same for components: # - IF(_var MATCHES "^(COMPAT_FILES|DOCUMENTATION|EXAMPLES|MESH_CONVERTER|PACKAGE|PARAMETER_GUI)") + IF(_var MATCHES "^(DOCUMENTATION|EXAMPLES|MESH_CONVERTER|PACKAGE|PARAMETER_GUI)") SET(DEAL_II_COMPONENT_${_var} ${${_var}} CACHE BOOL "" FORCE) UNSET(${_var} CACHE) ENDIF() diff --git a/cmake/setup_cpack.cmake b/cmake/setup_cpack.cmake index 8263780502..ee5363cf9e 100644 --- a/cmake/setup_cpack.cmake +++ b/cmake/setup_cpack.cmake @@ -67,7 +67,7 @@ IF(DEAL_II_COMPONENT_PACKAGE) INSTALL(FILES ${CMAKE_BINARY_DIR}/cpack/dealii.conf - DESTINATION ${DEAL_II_COMMON_RELDIR} + DESTINATION ${DEAL_II_SHARE_RELDIR} ) INSTALL(PROGRAMS diff --git a/cmake/setup_deal_ii.cmake b/cmake/setup_deal_ii.cmake index 641d021284..3f072f69c0 100644 --- a/cmake/setup_deal_ii.cmake +++ b/cmake/setup_deal_ii.cmake @@ -42,14 +42,15 @@ # DEAL_II_DEBUG_SUFFIX *) # DEAL_II_RELEASE_SUFFIX *) # -# DEAL_II_CMAKE_MACROS_RELDIR *) -# DEAL_II_DOCHTML_RELDIR *) -# DEAL_II_DOCREADME_RELDIR *) -# DEAL_II_EXAMPLES_RELDIR *) # DEAL_II_EXECUTABLE_RELDIR *) # DEAL_II_INCLUDE_RELDIR *) # DEAL_II_LIBRARY_RELDIR *) # DEAL_II_PROJECT_CONFIG_RELDIR *) +# DEAL_II_SHARE_RELDIR *) +# DEAL_II_CMAKE_MACROS_RELDIR *) +# DEAL_II_DOCREADME_RELDIR *) +# DEAL_II_DOCHTML_RELDIR *) +# DEAL_II_EXAMPLES_RELDIR *) # # DEAL_II_BUILD_TYPES # DEAL_II_LIST_SUFFIXES @@ -115,34 +116,18 @@ SET_IF_EMPTY(DEAL_II_BASE_NAME "${_base_name}") SET_IF_EMPTY(DEAL_II_DEBUG_SUFFIX ".g") SET_IF_EMPTY(DEAL_II_RELEASE_SUFFIX "") -IF(DEAL_II_COMPONENT_COMPAT_FILES) - # - # The good, old directory structure: - # - SET_IF_EMPTY(DEAL_II_CMAKE_MACROS_RELDIR "cmake/macros") - SET_IF_EMPTY(DEAL_II_COMMON_RELDIR "common") - SET_IF_EMPTY(DEAL_II_DOCHTML_RELDIR "doc") - SET_IF_EMPTY(DEAL_II_DOCREADME_RELDIR "") - SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "examples") - SET_IF_EMPTY(DEAL_II_EXECUTABLE_RELDIR "bin") - SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include") - SET_IF_EMPTY(DEAL_II_LIBRARY_RELDIR "lib") - SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}") -ELSE() - # - # IF DEAL_II_COMPONENT_COMPAT_FILES=off, we assume that we have to - # obey the FSHS... - # - SET_IF_EMPTY(DEAL_II_CMAKE_MACROS_RELDIR "share/${DEAL_II_PACKAGE_NAME}/cmake/Macros") - SET_IF_EMPTY(DEAL_II_COMMON_RELDIR "share/${DEAL_II_PACKAGE_NAME}/common") - SET_IF_EMPTY(DEAL_II_DOCREADME_RELDIR "share/doc/${DEAL_II_PACKAGE_NAME}") - SET_IF_EMPTY(DEAL_II_DOCHTML_RELDIR "${DEAL_II_DOCREADME_RELDIR}/html") - SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "share/doc/${DEAL_II_PACKAGE_NAME}/examples") - SET_IF_EMPTY(DEAL_II_EXECUTABLE_RELDIR "bin") - SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include") - SET_IF_EMPTY(DEAL_II_LIBRARY_RELDIR "lib${LIB_SUFFIX}") - SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}") -ENDIF() +# +# Try to obey the FSHS... +# +SET_IF_EMPTY(DEAL_II_EXECUTABLE_RELDIR "bin") +SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include") +SET_IF_EMPTY(DEAL_II_LIBRARY_RELDIR "lib${LIB_SUFFIX}") +SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}") +SET_IF_EMPTY(DEAL_II_SHARE_RELDIR "share/${DEAL_II_PACKAGE_NAME}") +SET_IF_EMPTY(DEAL_II_CMAKE_MACROS_RELDIR "${DEAL_II_SHARE_RELDIR}/cmake/Macros") +SET_IF_EMPTY(DEAL_II_DOCREADME_RELDIR "share/doc/${DEAL_II_PACKAGE_NAME}") +SET_IF_EMPTY(DEAL_II_DOCHTML_RELDIR "${DEAL_II_DOCREADME_RELDIR}/html") +SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "${DEAL_II_DOCREADME_RELDIR}/examples") IF(CMAKE_BUILD_TYPE MATCHES "Debug") LIST(APPEND DEAL_II_BUILD_TYPES "DEBUG") diff --git a/doc/users/cmake.html b/doc/users/cmake.html index 24ffdc2005..abe200fdb7 100644 --- a/doc/users/cmake.html +++ b/doc/users/cmake.html @@ -183,7 +183,7 @@ cmake -DWITH_MPI=ON <...> cmake -DDEAL_II_WITH_MPI=ON <...> The same holds for all variables starting with COMPONENT_ - and all individual component names: COMPAT_FILES, + and all individual component names: DOCUMENTATION, EXAMPLES, MESH_CONVERTER and PARAMETER_GUI (which will be expanded to the full DEAL_II_COMPONENT_* variable name). @@ -220,7 +220,6 @@ cmake -DDEAL_II_WITH_MPI=ON <...> # and reruns the configure and generate phases of CMake # rebuild_cache - rerun the configure and generate phases of CMake # -# compat_files - build and install component 'compat_files' # documentation - build and install component 'documentation' # examples - build and install component 'examples' # library - build and install component 'library' @@ -264,7 +263,6 @@ cmake -DDEAL_II_WITH_MPI=ON <...> # [...] # # Component configuration: -# DEAL_II_COMPONENT_COMPAT_FILES # ( DEAL_II_COMPONENT_DOCUMENTATION = OFF ) # DEAL_II_COMPONENT_EXAMPLES # DEAL_II_COMPONENT_MESH_CONVERTER @@ -402,7 +400,6 @@ $ cmake -GNinja [...] component (most notably the documentation) you can use one of the following top level targets:
-compat_files   - builds and installs the 'compat_files' component
 documentation  - builds and installs the 'documentation' component
 examples       - builds and installs the 'examples' component
 library        - builds and installs the 'library' component
@@ -705,18 +702,6 @@ cmake -DLAPACK_FOUND=true \
       deal.II will be configured, built and installed:
 
       
    -
  • -

    - DEAL_II_COMPONENT_COMPAT_FILES - (default ON): -

    -

    - Enable legacy directory structure and the installation of - compatibility files and tools for the old build system. This - adds a component compat_files to the build - system. -

    -
  • DEAL_II_COMPONENT_DOCUMENTATION @@ -911,27 +896,7 @@ cmake -DDEAL_II_CXX_FLAGS="-Wno-sign-compare" <...> CMAKE_INSTALL_PREFIX

- Please note that depending on whether - DEAL_II_COMPONENT_COMPAT_FILES is set, there will be - a different default directory structure: -
    -
  • - With DEAL_II_COMPONENT_COMPAT_FILES=ON: -
    -${CMAKE_INSTALL_PREFIX}/
    -    bin
    -    cmake/macros
    -    common
    -    common/scripts
    -    doc
    -    examples
    -    include
    -    lib
    -    lib/cmake/deal.II
    -
    - -
  • - With DEAL_II_COMPONENT_COMPAT_FILES=OFF: + The default directory structure is:
     ${CMAKE_INSTALL_PREFIX}/
         bin
    @@ -940,29 +905,29 @@ ${CMAKE_INSTALL_PREFIX}/
         lib${LIB_SUFFIX}/cmake/deal.II
         share/deal.II/
         share/deal.II/cmake/macros
    -    share/deal.II/examples
    +    share/doc/deal.II/
         share/doc/deal.II/html
    +    share/doc/deal.II/examples
     

- The default directory structure can be changed by by setting the + The default directory structure can be changed by setting the following variables:

-DEAL_II_CMAKE_MACROS_RELDIR
-DEAL_II_COMMON_RELDIR
-DEAL_II_DOCHTML_RELDIR
-DEAL_II_DOCREADME_RELDIR
-DEAL_II_EXAMPLES_RELDIR
 DEAL_II_EXECUTABLE_RELDIR
 DEAL_II_INCLUDE_RELDIR
 DEAL_II_LIBRARY_RELDIR
 DEAL_II_PROJECT_CONFIG_RELDIR
+DEAL_II_SHARE_RELDIR
+DEAL_II_CMAKE_MACROS_RELDIR
+DEAL_II_DOCREADME_RELDIR
+DEAL_II_DOCHTML_RELDIR
+DEAL_II_EXAMPLES_RELDIR
 

-

Initial cache file and advanced options

diff --git a/doc/users/cmakelists.html b/doc/users/cmakelists.html index 4282118f25..bad55716c4 100644 --- a/doc/users/cmakelists.html +++ b/doc/users/cmakelists.html @@ -47,7 +47,6 @@
  • Autopilot style CMakeLists.txt
  • deal.IIConfig.cmake
  • -
  • Legacy Make.global_options
  • @@ -728,7 +727,7 @@ DEAL_II_BUILD_TYPES - an all caps list of available configurations, DEAL_II_PATH DEAL_II_CMAKE_MACROS_RELDIR -DEAL_II_COMMON_RELDIR +DEAL_II_SHARE_RELDIR DEAL_II_DOCREADME_RELDIR DEAL_II_DOCHTML_RELDIR DEAL_II_EXAMPLES_RELDIR @@ -808,35 +807,6 @@ DEAL_II_WITH_UMFPACK DEAL_II_WITH_ZLIB - -

    Legacy Make.global_options

    - -

    - Before version 8.0, deal.II used the - traditional autoconf/make configuration and build - system. The interaction between these two programs, as well as - propagation of information from deal.II to user - programs happened through a number of files that were generated within - the deal.II directory tree. - The CMake build system sets up the following compatibility files (if - DEAL_II_COMPONENT_COMPAT_FILES is set, which is default): -

    -${CMAKE_INSTALL_PREFIX}/
    -    common/Make.global_options
    -    common/scripts/expand_instantiations
    -    common/scripts/make_dependencies
    -
    - - Therefore, it should be sufficient to set D in the old - user Makefiles to: -
    -D=/path/install/dir
    -
    - where /path/install/dir is the directory set up via - CMAKE_INSTALL_PREFIX (the path - deal.II was installed to). -

    -