From 49148bf6d92d819070fe7c28be34f5bb405ce131 Mon Sep 17 00:00:00 2001 From: maier Date: Fri, 4 Oct 2013 21:08:43 +0000 Subject: [PATCH] Small Bugfixes and Cleanup git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31127 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/CMakeLists.txt | 5 +- deal.II/cmake/scripts/CMakeLists.txt | 6 +-- deal.II/cmake/setup_custom_targets.cmake | 7 +++ deal.II/cmake/setup_deal_ii.cmake | 38 +++++++++++++- deal.II/cmake/setup_post_project_call.cmake | 58 --------------------- deal.II/source/CMakeLists.txt | 6 +-- 6 files changed, 51 insertions(+), 69 deletions(-) delete mode 100644 deal.II/cmake/setup_post_project_call.cmake diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt index 8a0c195935..81ee9592e8 100644 --- a/deal.II/CMakeLists.txt +++ b/deal.II/CMakeLists.txt @@ -80,9 +80,8 @@ PROJECT(deal.II CXX) ENABLE_LANGUAGE_OPTIONAL(C) ENABLE_LANGUAGE_OPTIONAL(Fortran) -INCLUDE(setup_post_project_call) - INCLUDE(setup_deal_ii) + INCLUDE(setup_compiler_flags) # @@ -146,7 +145,7 @@ ADD_SUBDIRECTORY(cmake/config) # has to be included after source ADD_SUBDIRECTORY(contrib) # has to be included after source ADD_SUBDIRECTORY(examples) -ADD_SUBDIRECTORY(tests ${CMAKE_BINARY_DIR}/quick_tests) +ADD_SUBDIRECTORY(tests ${CMAKE_BINARY_DIR}/tests/quick_tests) IF(DEAL_II_HAVE_TESTS_DIRECTORY) ADD_SUBDIRECTORY(${TEST_DIR} ${CMAKE_BINARY_DIR}/tests) diff --git a/deal.II/cmake/scripts/CMakeLists.txt b/deal.II/cmake/scripts/CMakeLists.txt index 299cc0257c..0032e33aaf 100644 --- a/deal.II/cmake/scripts/CMakeLists.txt +++ b/deal.II/cmake/scripts/CMakeLists.txt @@ -19,7 +19,7 @@ IF(NOT CMAKE_CROSSCOMPILING) IF(DEAL_II_COMPONENT_COMPAT_FILES) SET_TARGET_PROPERTIES(expand_instantiations - PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/common/scripts + PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/scripts ) INSTALL(TARGETS expand_instantiations EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets @@ -29,7 +29,7 @@ IF(NOT CMAKE_CROSSCOMPILING) ENDIF() EXPORT(TARGETS expand_instantiations - FILE ${CMAKE_BINARY_DIR}/importExecutables.cmake + FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake ) ENDIF() @@ -90,7 +90,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES) ENDIF() SET_TARGET_PROPERTIES(make_dependencies report_features - PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/common/scripts + PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/scripts ) INSTALL(TARGETS make_dependencies report_features diff --git a/deal.II/cmake/setup_custom_targets.cmake b/deal.II/cmake/setup_custom_targets.cmake index 5b73f3e30c..4a8cb3130d 100644 --- a/deal.II/cmake/setup_custom_targets.cmake +++ b/deal.II/cmake/setup_custom_targets.cmake @@ -17,6 +17,13 @@ # # Add convenience targets that build and install only a specific component: # +# library +# compat_files +# documentation +# examples +# mesh_converter +# parameter_gui +# # The library can always be installed ;-) ADD_CUSTOM_TARGET(library diff --git a/deal.II/cmake/setup_deal_ii.cmake b/deal.II/cmake/setup_deal_ii.cmake index a07c54f465..58fbd0e16e 100644 --- a/deal.II/cmake/setup_deal_ii.cmake +++ b/deal.II/cmake/setup_deal_ii.cmake @@ -18,7 +18,8 @@ # Set up deal.II specific definitions # # This file defines a long list of uncached variables, used throughout the -# configuration to determine paths, locations and names. +# configuration to determine paths, locations and names. Some linkage and +# crosscompilation setup happens also in here. # # Definitions marked with *) can be overriden by defining them to cache # prior to the call of this file. This is done with the help of the @@ -135,7 +136,6 @@ ELSE() SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}") ENDIF() - IF(CMAKE_BUILD_TYPE MATCHES "Debug") LIST(APPEND DEAL_II_BUILD_TYPES "DEBUG") ENDIF() @@ -144,3 +144,37 @@ IF(CMAKE_BUILD_TYPE MATCHES "Release") LIST(APPEND DEAL_II_BUILD_TYPES "RELEASE") ENDIF() + +######################################################################## +# # +# Setup static linkage and crosscompilation: # +# # +######################################################################## + +# +# Library search order: +# +IF(DEAL_II_PREFER_STATIC_LIBS) + # Invert the search order for libraries when DEAL_II_PREFER_STATIC_LIBS + # is set. This will prefer static archives instead of shared libraries: + LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) +ENDIF() + +# +# Cross compilation stuff: +# +IF(CMAKE_CROSSCOMPILING) + # Disable platform introspection when cross compiling + SET(DEAL_II_ALLOW_PLATFORM_INTROSPECTION OFF CACHE BOOL "" FORCE) + + # Import native expand_instantiations for use in cross compilation: + SET(DEAL_II_NATIVE "DEAL_II_NATIVE-NOTFOUND" CACHE FILEPATH + "A pointer to a native deal.Ii build directory" + ) + IF(DEAL_II_NATIVE MATCHES "-NOTFOUND") + MESSAGE(FATAL_ERROR + "Please set the CMake variable DEAL_II_NATIVE to a valid path that points to a native deal.II build directory" + ) + ENDIF() + INCLUDE(${DEAL_II_NATIVE}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake) +ENDIF() diff --git a/deal.II/cmake/setup_post_project_call.cmake b/deal.II/cmake/setup_post_project_call.cmake deleted file mode 100644 index 60aad894df..0000000000 --- a/deal.II/cmake/setup_post_project_call.cmake +++ /dev/null @@ -1,58 +0,0 @@ -## --------------------------------------------------------------------- -## $Id$ -## -## Copyright (C) 2013 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. -## -## --------------------------------------------------------------------- - - -######################################################################## -# # -# Setup that has to happen after the call to PROJECT(): # -# # -######################################################################## - -# -# Library search order: -# -IF(DEAL_II_PREFER_STATIC_LIBS) - # - # Invert the search order for libraries when DEAL_II_PREFER_STATIC_LIBS - # is set. This will prefer static archives instead of shared libraries: - # - # TODO: Does this work on a Windows or CYGWIN target? - LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) -ENDIF() - - -# -# Cross compilation stuff: -# -IF(CMAKE_CROSSCOMPILING) - # - # Disable platform introspection when cross compiling - # - SET(DEAL_II_ALLOW_PLATFORM_INTROSPECTION OFF CACHE BOOL "" FORCE) - - # - # Import native expand_instantiations for use in cross compilation: - # - SET(DEAL_II_NATIVE "DEAL_II_NATIVE-NOTFOUND" CACHE FILEPATH - "A pointer to a native deal.Ii build directory" - ) - IF(DEAL_II_NATIVE MATCHES "-NOTFOUND") - MESSAGE(FATAL_ERROR - "Please set the CMake variable DEAL_II_NATIVE to a valid path that points to a native deal.II build directory" - ) - ENDIF() - INCLUDE(${DEAL_II_NATIVE}/importExecutables.cmake) -ENDIF() diff --git a/deal.II/source/CMakeLists.txt b/deal.II/source/CMakeLists.txt index aa94d1d8ec..ec1f36db0c 100644 --- a/deal.II/source/CMakeLists.txt +++ b/deal.II/source/CMakeLists.txt @@ -79,9 +79,9 @@ FOREACH(build ${DEAL_II_BUILD_TYPES}) COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${build}}" COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${build}}" INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}" - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}" ) TARGET_LINK_LIBRARIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX} -- 2.39.5