From 211bd169e87663c3cd1f0acf2b0799504fffb393 Mon Sep 17 00:00:00 2001 From: Amul Shah Date: Sat, 16 Jun 2012 00:40:44 -0400 Subject: [PATCH] move mumps.cmake to sr_unix. create UTF8 GDE OBJs WARNING WARNING WARNING The rules to create the UTF-8 mode GDE object files do what is desired, but I don't think that I did them correctly. Additionally, we need some way to query the installed ICU version on the deployment host and get the value into CMAKE. Normally, we use: icu-config --version | cut -d"." -f -2 To get the UTF-8 GDE object files I set gtm_icu_version to 4.8 prior to running CMAKE. While this works, it's not friendly to anyone. --- CMakeLists.txt | 41 +++++++++++++++++++------------- {sr_port => sr_unix}/mumps.cmake | 2 ++ 2 files changed, 26 insertions(+), 17 deletions(-) rename {sr_port => sr_unix}/mumps.cmake (88%) diff --git a/CMakeLists.txt b/CMakeLists.txt index a82d822..146897c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -509,19 +509,26 @@ install(FILES ${scripts} ) foreach(in ${gde_routines}) - string(REPLACE ".m" ".o" out "${in}") - add_custom_command( - OUTPUT ${out} - DEPENDS ${in} ${GTM_SOURCE_DIR}/sr_port/mumps.cmake - COMMAND ${CMAKE_COMMAND} - -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}) - install(FILES "${out}" DESTINATION ${GTM_INSTALL_DIR}) + foreach(gtm_chset + "" + "UTF-8") + string(REPLACE "UTF-8" "/utf8" chset "${gtm_chset}") + string(REPLACE ".m" ".o" out "${in}") + add_custom_command( + OUTPUT ${chset}${out} + DEPENDS ${in} ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake + COMMAND ${CMAKE_COMMAND} + -D gtm_dist=${GTM_BINARY_DIR} + -D gtm_chset=${gtm_chset} + -D gtm_icu_version="4.8" + -D mumps=$ + -D "args=${in}" + -P ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake + VERBATIM + ) + list(APPEND files_to_place ${out}) + install(FILES "${out}" DESTINATION ${GTM_INSTALL_DIR}${chset}) + endforeach() endforeach() set(GTM_TOP "${GTM_BINARY_DIR}") @@ -571,14 +578,14 @@ add_custom_command( 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/mumps.cmake + ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake WORKING_DIRECTORY ${GTM_BINARY_DIR}/gen COMMAND ${CMAKE_COMMAND} -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 + -P ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake VERBATIM ) list(APPEND gen_bootstrap_files gen/ttt.c) @@ -593,13 +600,13 @@ foreach(msg 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/mumps.cmake + DEPENDS gen/msg.m ${GTM_SOURCE_DIR}/${msg} ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake WORKING_DIRECTORY ${GTM_BINARY_DIR}/gen COMMAND ${CMAKE_COMMAND} -D gtm_dist=${GTM_BINARY_DIR} -D mumps=$ -D "args=${mumps_msg_args}" - -P ${GTM_SOURCE_DIR}/sr_port/mumps.cmake + -P ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake VERBATIM ) list(APPEND gen_bootstrap_files gen/${name}_ctl.c) diff --git a/sr_port/mumps.cmake b/sr_unix/mumps.cmake similarity index 88% rename from sr_port/mumps.cmake rename to sr_unix/mumps.cmake index 7b16629..1f5221f 100644 --- a/sr_port/mumps.cmake +++ b/sr_unix/mumps.cmake @@ -10,6 +10,8 @@ ################################################################# set(ENV{gtm_dist} "${gtm_dist}") set(ENV{gtmroutines} ".") +set(ENV{gtm_chset} "${gtm_chset}") +set(ENV{gtm_icu_version} "${gtm_icu_version}") if(output_file) set(output_file OUTPUT_FILE ${output_file}) endif()