From 1974a8887885f6dc13f8b27c44a1e93b174c8772 Mon Sep 17 00:00:00 2001 From: maier Date: Fri, 1 Nov 2013 11:24:02 +0000 Subject: [PATCH] Bugfix: Always build expand_instantiations git-svn-id: https://svn.dealii.org/trunk@31501 0785d39b-7218-0410-832d-ea1e28bc413d --- .../macros/macro_expand_instantiations.cmake | 11 ++++--- deal.II/cmake/scripts/CMakeLists.txt | 33 +++++++------------ 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/deal.II/cmake/macros/macro_expand_instantiations.cmake b/deal.II/cmake/macros/macro_expand_instantiations.cmake index 9574b0fab8..b377b54717 100644 --- a/deal.II/cmake/macros/macro_expand_instantiations.cmake +++ b/deal.II/cmake/macros/macro_expand_instantiations.cmake @@ -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} diff --git a/deal.II/cmake/scripts/CMakeLists.txt b/deal.II/cmake/scripts/CMakeLists.txt index 6341917a7a..82e0bb4eff 100644 --- a/deal.II/cmake/scripts/CMakeLists.txt +++ b/deal.II/cmake/scripts/CMakeLists.txt @@ -14,21 +14,13 @@ ## ## --------------------------------------------------------------------- -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 ) -- 2.39.5