From eb42ac5565ac5322dc0784a7f5c01d0f89c77ad9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 19 Jun 2012 14:00:38 -0400 Subject: [PATCH] Generate and install (gtm|gde)help.dat --- CMakeLists.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ sr_unix/mumps.cmake | 5 +++++ 2 files changed, 50 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 764e27c..a2117fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -517,6 +517,51 @@ foreach(gtm_chset "" "UTF-8") endforeach() endforeach() +#----------------------------------------------------------------------------- +set(gtm_hlp mumps.hlp) +set(gde_hlp gde.hlp) +foreach(help gtm gde) + set(CMAKE_CONFIGURABLE_FILE_CONTENT + "Change -segment DEFAULT -block=2048 -file=${help}help.dat +Change -region DEFAULT -record=1020 -key=255 +exit") + configure_file(${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in + ${GTM_BINARY_DIR}/${help}help.in1) + set(CMAKE_CONFIGURABLE_FILE_CONTENT + "Do ^GTMHLPLD +${GTM_SOURCE_DIR}/sr_port/${${help}_hlp} +Halt") + configure_file(${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in + ${GTM_BINARY_DIR}/${help}help.in2) + set(env + -D gtm_dist=${GTM_BINARY_DIR} + -D gtmroutines=. + -D gtmgbldir=${GTM_BINARY_DIR}/${help}help + ) + add_custom_command( + OUTPUT ${help}help.dat ${help}help.gld + DEPENDS ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake mumps mupip + ${GTM_BINARY_DIR}/${help}help.in1 + ${GTM_BINARY_DIR}/${help}help.in2 + COMMAND ${CMAKE_COMMAND} -E remove ${help}help.dat ${help}help.gld + COMMAND ${CMAKE_COMMAND} ${env} + -D mumps=$ -D "args=-run;GDE" + -D input_file=${GTM_BINARY_DIR}/${help}help.in1 + -P ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake + COMMAND ${CMAKE_COMMAND} ${env} + -D mumps=$ -D "args=create" + -P ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake + COMMAND ${CMAKE_COMMAND} ${env} + -D mumps=$ -D "args=-direct" + -D input_file=${GTM_BINARY_DIR}/${help}help.in2 + -P ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake + VERBATIM + ) + list(APPEND files_to_place ${help}help.dat) + install(FILES ${GTM_BINARY_DIR}/${help}help.dat DESTINATION ${GTM_INSTALL_DIR}) +endforeach() +#----------------------------------------------------------------------------- + set(GTM_TOP "${GTM_BINARY_DIR}") configure_file(sr_unix/gpgagent.tab.in plugin/gpgagent.tab @ONLY) set(GTM_TOP "${CMAKE_INSTALL_PREFIX}/${GTM_INSTALL_DIR}") diff --git a/sr_unix/mumps.cmake b/sr_unix/mumps.cmake index 2f49e1b..e998330 100644 --- a/sr_unix/mumps.cmake +++ b/sr_unix/mumps.cmake @@ -13,15 +13,20 @@ foreach(v gtmroutines gtm_chset gtm_icu_version + gtmgbldir ) if(DEFINED ${v}) set("ENV{${v}}" "${${v}}") endif() endforeach() +if(input_file) + set(input_file INPUT_FILE ${input_file}) +endif() if(output_file) set(output_file OUTPUT_FILE ${output_file}) endif() execute_process( COMMAND ${mumps} ${args} + ${input_file} ${output_file} )