]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bugfix: resolve issue 105
authorMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 3 Oct 2013 23:17:06 +0000 (23:17 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 3 Oct 2013 23:17:06 +0000 (23:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@31109 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/cmake/scripts/CMakeLists.txt
deal.II/cmake/setup_custom_targets.cmake [new file with mode: 0644]
deal.II/cmake/setup_finalize.cmake
deal.II/contrib/CMakeLists.txt
deal.II/contrib/mesh_conversion/CMakeLists.txt
deal.II/contrib/parameter_gui/CMakeLists.txt
deal.II/doc/CMakeLists.txt
deal.II/source/CMakeLists.txt

index 714613a8c7f85a71fb7ba5a089abfda27301942d..239be6ea18d5778f81688d955014c94bfc835b76 100644 (file)
@@ -117,6 +117,7 @@ ENDFOREACH()
 #
 # Finalize the configuration:
 #
+INCLUDE(setup_custom_targets)
 INCLUDE(setup_finalize)
 
 
index 96539b783549c9fbd2d8ecfe5c56103afdc3dbf1..299cc0257cb50b5a7ee6a6f18596440160739bfe 100644 (file)
@@ -79,14 +79,10 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
       )
   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)
diff --git a/deal.II/cmake/setup_custom_targets.cmake b/deal.II/cmake/setup_custom_targets.cmake
new file mode 100644 (file)
index 0000000..3781d4c
--- /dev/null
@@ -0,0 +1,51 @@
+## ---------------------------------------------------------------------
+## $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()
+
index 0584cc7696d55f4af15175ed79e1bf70527f484a..bcb40185ee8a30ecce9a2f854d663ad247f986b2 100644 (file)
@@ -258,7 +258,7 @@ FOREACH(_var ${_components})
 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###")
index f507b519ebb5fed97dea9d097298cb690646a22e..6e92950efaaebe5631c5d8101b9ae9e93cd83c36 100644 (file)
@@ -22,5 +22,3 @@ IF(DEAL_II_COMPONENT_PARAMETER_GUI)
   ADD_SUBDIRECTORY(parameter_gui)
 ENDIF()
 
-#ADD_SUBDIRECTORY(test_affinity)
-
index 2c8dbc4c8ff5591cdec20bf7923354fda420502c..72e26ef2c4df77a3102206c362016fc47bed1a8c 100644 (file)
 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
   )
-
index 542b9a57666d50012cfa1d79322867fc78e775bd..7ff3f24f7efac2c21502c709380cace44bca021e 100644 (file)
@@ -35,7 +35,7 @@ QT4_ADD_RESOURCES(SOURCE_RCC
   application.qrc
   )
 
-ADD_EXECUTABLE(parameter_gui
+ADD_EXECUTABLE(parameter_gui_exe
   browse_lineedit.cpp
   info_message.cpp
   main.cpp
@@ -46,16 +46,17 @@ ADD_EXECUTABLE(parameter_gui
   ${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
   )
 
index 8e63586481bf3d8afa700224b58dc3a5a0dc038c..35613026ca0c1e0294f6908a8a87ae881b2a3fef 100644 (file)
@@ -50,7 +50,7 @@ IF(DEAL_II_COMPONENT_DOCUMENTATION)
   #
   # 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:
index 5b21083aac97b8d7a36efaf84cbab2f633fddf95..aa94d1d8ecaeb1d5d0183b3d74a8ff4ce837f48d 100644 (file)
@@ -49,9 +49,6 @@ ADD_SUBDIRECTORY(integrators)
 ADD_SUBDIRECTORY(matrix_free)
 ADD_SUBDIRECTORY(meshworker)
 
-
-ADD_CUSTOM_TARGET(library)
-
 FOREACH(build ${DEAL_II_BUILD_TYPES})
   STRING(TOLOWER ${build} build_lowercase)
 

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.