]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Bugfix: Always build expand_instantiations
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 1 Nov 2013 11:24:02 +0000 (11:24 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 1 Nov 2013 11:24:02 +0000 (11:24 +0000)
git-svn-id: https://svn.dealii.org/trunk@31501 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/macros/macro_expand_instantiations.cmake
deal.II/cmake/scripts/CMakeLists.txt

index 9574b0fab8777b3844d0491993a3a1ce0da4dc7e..b377b54717d123cca8965a15dd515090ca21bd81 100644 (file)
@@ -38,9 +38,12 @@ MACRO(EXPAND_INSTANTIATIONS _target _inst_in_files)
   FOREACH (_inst_in_file ${_inst_in_files})
     STRING(REGEX REPLACE "\\.in$" "" _inst_file "${_inst_in_file}" )
 
-    SET(_dependency)
-    IF(TARGET expand_instantiations)
-      SET(_dependency expand_instantiations)
+    IF(NOT CMAKE_CROSSCOMPILING)
+      SET(_command expand_instantiations_exe)
+      SET(_dependency expand_instantiations_exe)
+    ELSE()
+      SET(_command expand_instantiations)
+      SET(_dependency)
     ENDIF()
 
     ADD_CUSTOM_COMMAND(
@@ -48,7 +51,7 @@ MACRO(EXPAND_INSTANTIATIONS _target _inst_in_files)
       DEPENDS ${_dependency}
               ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/template-arguments
               ${CMAKE_CURRENT_SOURCE_DIR}/${_inst_in_file}
-      COMMAND expand_instantiations
+      COMMAND ${_command}
       ARGS ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/template-arguments
            < ${CMAKE_CURRENT_SOURCE_DIR}/${_inst_in_file}
            > ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file}
index 6341917a7a47beb73f5552205c9f1fd7a48c38c1..82e0bb4effb8ee385609533da9cae5dca8d98f25 100644 (file)
 ##
 ## ---------------------------------------------------------------------
 
-IF(NOT CMAKE_CROSSCOMPILING)
-  ADD_EXECUTABLE(expand_instantiations expand_instantiations.cc)
-
-  IF(DEAL_II_COMPONENT_COMPAT_FILES)
-    SET_TARGET_PROPERTIES(expand_instantiations
-      PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/scripts
-      )
-    INSTALL(TARGETS expand_instantiations
-      DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts
-      COMPONENT compat_files
-      )
-  ENDIF()
-ENDIF()
+ADD_EXECUTABLE(expand_instantiations_exe expand_instantiations.cc)
+SET_TARGET_PROPERTIES(expand_instantiations_exe
+  PROPERTIES OUTPUT_NAME expand_instantiations
+  )
 
 IF(DEAL_II_COMPONENT_COMPAT_FILES)
+
   #
   # Build and install the old dependency_resolution and report_features
   # executables:
@@ -74,21 +66,20 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
       )
   ENDIF()
 
+  IF(NOT CMAKE_CROSSCOMPILING)
+    ADD_CUSTOM_TARGET(run_report_features COMMAND report_features)
+  ENDIF()
+
   ADD_DEPENDENCIES(compat_files
-    expand_instantiations
+    expand_instantiations_exe
     make_dependencies
     report_features
     )
 
-  IF(NOT CMAKE_CROSSCOMPILING)
-    ADD_CUSTOM_TARGET(run_report_features COMMAND report_features)
-  ENDIF()
-
-  SET_TARGET_PROPERTIES(make_dependencies report_features
+  SET_TARGET_PROPERTIES(expand_instantiations_exe make_dependencies report_features
     PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/scripts
     )
-
-  INSTALL(TARGETS make_dependencies report_features
+  INSTALL(TARGETS expand_instantiations_exe make_dependencies report_features
     DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts
     COMPONENT compat_files
     )

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.