diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a2a1b2..9e552aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -465,12 +465,12 @@ foreach(in ${gde_routines}) string(REPLACE ".m" ".o" out "${in}") add_custom_command( OUTPUT ${out} - DEPENDS ${in} + DEPENDS ${in} ${GTM_SOURCE_DIR}/sr_port/mumps.cmake COMMAND ${CMAKE_COMMAND} - -D gtm_dist=${GTM_BINARY_DIR} - -D mumps=$ - -D input=${in} - -P ${GTM_SOURCE_DIR}/sr_port/mumps.cmake + -D gtm_dist=${GTM_BINARY_DIR} + -D mumps=$ + -D "args=${in}" + -P ${GTM_SOURCE_DIR}/sr_port/mumps.cmake VERBATIM ) list(APPEND files_to_place ${out}) @@ -520,18 +520,25 @@ foreach(m chk2lev.m chkop.m gendash.m genout.m loadop.m loadvx.m msg.m tttgen.m ) endforeach() +set(mumps_ttt_args -run tttgen + ${GTM_SOURCE_DIR}/sr_unix/ttt.txt + ${GTM_SOURCE_DIR}/sr_port/opcode_def.h + ${GTM_SOURCE_DIR}/sr_port/vxi.h + ) add_custom_command( OUTPUT gen/ttt.c DEPENDS ${GTM_SOURCE_DIR}/sr_unix/ttt.txt gen/chk2lev.m gen/chkop.m gen/gendash.m gen/genout.m gen/loadop.m - gen/loadvx.m gen/tttgen.m gen/tttscan.m ${GTM_SOURCE_DIR}/sr_port/tttgen.cmake + gen/loadvx.m gen/tttgen.m gen/tttscan.m + ${GTM_SOURCE_DIR}/sr_port/mumps.cmake WORKING_DIRECTORY ${GTM_BINARY_DIR}/gen COMMAND ${CMAKE_COMMAND} - -D gtm_dist=${GTM_BINARY_DIR} - -D mumps=$ - -D sr_port=${GTM_SOURCE_DIR}/sr_port - -D input=${GTM_SOURCE_DIR}/sr_unix/ttt.txt - -P ${GTM_SOURCE_DIR}/sr_port/tttgen.cmake + -D gtm_dist=${GTM_BINARY_DIR} + -D mumps=$ + -D "args=${mumps_ttt_args}" + -D output_file=ttt.log + -P ${GTM_SOURCE_DIR}/sr_port/mumps.cmake + VERBATIM ) list(APPEND gen_bootstrap_files gen/ttt.c) @@ -542,15 +549,17 @@ foreach(msg sr_unix_gnp/cmierrors.msg ) get_filename_component(name ${msg} NAME_WE) + set(mumps_msg_args -run msg ${GTM_SOURCE_DIR}/${msg} unix) add_custom_command( OUTPUT gen/${name}_ctl.c - DEPENDS gen/msg.m ${GTM_SOURCE_DIR}/${msg} ${GTM_SOURCE_DIR}/sr_port/msg.cmake + DEPENDS gen/msg.m ${GTM_SOURCE_DIR}/${msg} ${GTM_SOURCE_DIR}/sr_port/mumps.cmake WORKING_DIRECTORY ${GTM_BINARY_DIR}/gen COMMAND ${CMAKE_COMMAND} - -D gtm_dist=${GTM_BINARY_DIR} - -D mumps=$ - -D input=${GTM_SOURCE_DIR}/${msg} - -P ${GTM_SOURCE_DIR}/sr_port/msg.cmake + -D gtm_dist=${GTM_BINARY_DIR} + -D mumps=$ + -D "args=${mumps_msg_args}" + -P ${GTM_SOURCE_DIR}/sr_port/mumps.cmake + VERBATIM ) list(APPEND gen_bootstrap_files gen/${name}_ctl.c) endforeach() diff --git a/sr_port/msg.cmake b/sr_port/msg.cmake deleted file mode 100644 index 91973af..0000000 --- a/sr_port/msg.cmake +++ /dev/null @@ -1,15 +0,0 @@ -################################################################# -# # -# Copyright 2012 Fidelity Information Services, Inc # -# # -# This source code contains the intellectual property # -# of its copyright holder(s), and is made available # -# under a license. If you do not know the terms of # -# the license, please stop and do not read further. # -# # -################################################################# -set(ENV{gtm_dist} "${gtm_dist}") -set(ENV{gtmroutines} ".") -execute_process( - COMMAND ${mumps} -run msg ${input} unix - ) diff --git a/sr_port/mumps.cmake b/sr_port/mumps.cmake index f402e71..7b16629 100644 --- a/sr_port/mumps.cmake +++ b/sr_port/mumps.cmake @@ -10,6 +10,10 @@ ################################################################# set(ENV{gtm_dist} "${gtm_dist}") set(ENV{gtmroutines} ".") +if(output_file) + set(output_file OUTPUT_FILE ${output_file}) +endif() execute_process( - COMMAND ${mumps} ${input} + COMMAND ${mumps} ${args} + ${output_file} ) diff --git a/sr_port/tttgen.cmake b/sr_port/tttgen.cmake deleted file mode 100644 index ce06878..0000000 --- a/sr_port/tttgen.cmake +++ /dev/null @@ -1,16 +0,0 @@ -################################################################# -# # -# Copyright 2012 Fidelity Information Services, Inc # -# # -# This source code contains the intellectual property # -# of its copyright holder(s), and is made available # -# under a license. If you do not know the terms of # -# the license, please stop and do not read further. # -# # -################################################################# -set(ENV{gtm_dist} "${gtm_dist}") -set(ENV{gtmroutines} ".") -execute_process( - COMMAND ${mumps} -run tttgen ${input} ${sr_port}/opcode_def.h ${sr_port}/vxi.h - OUTPUT_FILE ttt.log - )