#
# Finalize the configuration:
#
+INCLUDE(setup_custom_targets)
INCLUDE(setup_finalize)
)
ENDIF()
- #
- # A custom target with the same name as the component:
- #
- ADD_CUSTOM_TARGET(compat_files
- DEPENDS
- expand_instantiations
- make_dependencies
- report_features
+ ADD_DEPENDENCIES(compat_files
+ expand_instantiations
+ make_dependencies
+ report_features
)
IF(NOT CMAKE_CROSSCOMPILING)
--- /dev/null
+## ---------------------------------------------------------------------
+## $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.
+##
+## ---------------------------------------------------------------------
+
+#
+# Add convenience targets that build and install only a specific component:
+#
+
+FOREACH(_component library examples)
+ ADD_CUSTOM_TARGET(${_component}
+ COMMAND ${CMAKE_COMMAND}
+ -DCOMPONENT="${_component}" -P cmake_install.cmake
+ COMMENT "Build and install component \"${_component}\"."
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ )
+ENDFOREACH()
+
+FOREACH(_component compat_files documentation mesh_converter parameter_gui)
+ STRING(TOUPPER "${_component}" _component_uppercase)
+ IF(DEAL_II_COMPONENT_${_component_uppercase})
+
+ ADD_CUSTOM_TARGET(${_component}
+ COMMAND ${CMAKE_COMMAND}
+ -DCOMPONENT="${_component}" -P cmake_install.cmake
+ COMMENT "Build and install component \"${_component}\"."
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ )
+
+ ELSE()
+
+ ADD_CUSTOM_TARGET(${_component}
+ COMMAND ${CMAKE_COMMAND} -E echo "Error: Could not build and install disabled component \"${_component}\"."
+ && ${CMAKE_COMMAND} -E echo "Please reconfigure with -DDEAL_II_COMPONENT_${_component}=yes"
+ && false
+ )
+
+ ENDIF()
+ENDFOREACH()
+
ENDFOREACH()
_summary(
- "#\n# Detailed information (compiler flags, feature configuration) can be found in detailed.log\n"
+ "#\n# Detailed information (compiler flags, feature configuration) can be found in detailed.log\n"
)
_both("#\n###")
ADD_SUBDIRECTORY(parameter_gui)
ENDIF()
-#ADD_SUBDIRECTORY(test_affinity)
-
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
#PROJECT(mesh_converter)
-ADD_EXECUTABLE(mesh_converter
+ADD_EXECUTABLE(mesh_converter_exe
Main.cc
MeshConversion.cc
)
+SET_TARGET_PROPERTIES(mesh_converter_exe
+ PROPERTIES OUTPUT_NAME mesh_converter
+ )
+
+ADD_DEPENDENCIES(mesh_converter mesh_converter_exe)
IF("${DEAL_II_EXECUTABLE_RELDIR}" STREQUAL "")
SET(DEAL_II_EXECUTABLE_RELDIR "bin")
ENDIF()
-INSTALL(TARGETS mesh_converter
+INSTALL(TARGETS mesh_converter_exe
RUNTIME
DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
COMPONENT mesh_converter
)
-
application.qrc
)
-ADD_EXECUTABLE(parameter_gui
+ADD_EXECUTABLE(parameter_gui_exe
browse_lineedit.cpp
info_message.cpp
main.cpp
${SOURCE_MOC}
${SOURCE_RCC}
)
+SET_TARGET_PROPERTIES(parameter_gui_exe PROPERTIES OUTPUT_NAME parameter_gui)
+TARGET_LINK_LIBRARIES(parameter_gui_exe ${QT_LIBRARIES})
-TARGET_LINK_LIBRARIES(parameter_gui ${QT_LIBRARIES})
+ADD_DEPENDENCIES(parameter_gui parameter_gui_exe)
IF("${DEAL_II_EXECUTABLE_RELDIR}" STREQUAL "")
SET(DEAL_II_EXECUTABLE_RELDIR "bin")
ENDIF()
-INSTALL(TARGETS parameter_gui
- RUNTIME
- DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
+INSTALL(TARGETS parameter_gui_exe
+ RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
COMPONENT parameter_gui
)
#
# A custom target with the same name as the component:
#
- ADD_CUSTOM_TARGET(documentation DEPENDS doxygen)
+ ADD_DEPENDENCIES(documentation doxygen)
#
# Install the static elements of the html documentation:
ADD_SUBDIRECTORY(matrix_free)
ADD_SUBDIRECTORY(meshworker)
-
-ADD_CUSTOM_TARGET(library)
-
FOREACH(build ${DEAL_II_BUILD_TYPES})
STRING(TOLOWER ${build} build_lowercase)