[med-svn] [vista] 01/01: Added CMake option for precompiling routines.

Luis Ibanez luisibanez-guest at moszumanska.debian.org
Tue Jan 28 14:32:55 UTC 2014


This is an automated email from the git hooks/post-receive script.

luisibanez-guest pushed a commit to branch master
in repository vista.

commit 4207ac6e6a92d216464c78c3e6571b0108cca618
Author: Luis Ibanez <luis.ibanez at kitware.com>
Date:   Tue Jan 28 09:31:05 2014 -0500

    Added CMake option for precompiling routines.
---
 Testing/Setup/CMakeLists.txt | 38 +++++++++++++++++++++-----------------
 debian/changelog             |  1 +
 debian/rules                 |  1 +
 3 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/Testing/Setup/CMakeLists.txt b/Testing/Setup/CMakeLists.txt
index bad5808..259c171 100644
--- a/Testing/Setup/CMakeLists.txt
+++ b/Testing/Setup/CMakeLists.txt
@@ -29,6 +29,8 @@ set(TEST_VISTA_FRESH_GLOBALS_IMPORT_TIMEOUT 3600 CACHE STRING "Timeout in second
 set(TEST_VISTA_SETUP_SITE_NAME "DEMO.OSEHRA.ORG" CACHE STRING "Name to set for the site address when initializing VistA instance.  Default is 'DEMO.OSEHRA.ORG'")
 set(TEST_VISTA_SETUP_PRIMARY_HFS_DIRECTORY "@" CACHE PATH "Absolute path to the system temp directory.  The default of '@' will cause the system to use the working directory of the process as the temp directory.  This path has a limit of 50 characters.  Avoid Windows paths with a '~' ")
 
+option(VISTA_PRECOMPILE_ALL_ROUTINES "Pre-compile all the M routines" OFF)
+
 foreach(fvariable ${freshinfo})
   if(NOT ${fvariable})
     message(SEND_ERROR "The value for ${fvariable} needs to be set for TEST_VISTA_FRESH to be run successfully.")
@@ -65,25 +67,27 @@ if(VISTA_HAVE_BUILD_TOOL)
   endif()
   add_custom_target(FreshVistA ${all} COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/ImportRG.cmake)
 
-  add_custom_target(CompileMRoutines
-    DEPENDS FreshVistA
-    )
-
-  foreach(mroutine in ${TEST_VISTA_FRESH_GTM_ROUTINES_LIST} )
-    get_filename_component(name_without_extension ${mroutine} NAME_WE)
-    set(target_object_file ${name_without_extension}.o)
-    set(target_object_file_with_path ${TEST_VISTA_FRESH_GTM_OBJECT_DIR}/${target_object_file})
-    set(source_routine_file_with_path ${TEST_VISTA_FRESH_GTM_ROUTINE_DIR}/${mroutine})
-    # Could set here set(ENV{gtm_destdir} "base of the debian path")
-    # as well as the other environment variables needed by fis-gtm to run.
-    add_custom_target(${target_object_file}
+  if(VISTA_PRECOMPILE_ALL_ROUTINES)
+    add_custom_target(CompileMRoutines
       DEPENDS FreshVistA
-      WORKING_DIRECTORY ${TEST_VISTA_FRESH_GTM_OBJECT_DIR}
-      COMMAND  ${GTM_DIST}/mumps -object=${target_object_file_with_path} ${source_routine_file_with_path}
       )
-    add_dependencies(${target_object_file} FreshVistA)
-    add_dependencies(CompileMRoutines ${target_object_file})
-  endforeach()
+
+    foreach(mroutine in ${TEST_VISTA_FRESH_GTM_ROUTINES_LIST} )
+      get_filename_component(name_without_extension ${mroutine} NAME_WE)
+      set(target_object_file ${name_without_extension}.o)
+      set(target_object_file_with_path ${TEST_VISTA_FRESH_GTM_OBJECT_DIR}/${target_object_file})
+      set(source_routine_file_with_path ${TEST_VISTA_FRESH_GTM_ROUTINE_DIR}/${mroutine})
+      # Could set here set(ENV{gtm_destdir} "base of the debian path")
+      # as well as the other environment variables needed by fis-gtm to run.
+      add_custom_target(${target_object_file}
+        DEPENDS FreshVistA
+        WORKING_DIRECTORY ${TEST_VISTA_FRESH_GTM_OBJECT_DIR}
+        COMMAND  ${GTM_DIST}/mumps -object=${target_object_file_with_path} ${source_routine_file_with_path}
+        )
+      add_dependencies(${target_object_file} FreshVistA)
+      add_dependencies(CompileMRoutines ${target_object_file})
+    endforeach()
+  else()
 
 else()
   set_property(GLOBAL APPEND PROPERTY VISTA_BUILD_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/ImportRG.cmake)
diff --git a/debian/changelog b/debian/changelog
index 06539af..bc72a40 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,5 +32,6 @@ vista-foia (0.20140106-1) UNRELEASED; urgency=low
   * In rules, refining auto_install rule.
   * In rules, remove code to compile .m files. Now moved to CMake itself.
   * In rules, added final installation rule. Targeting debuild expected dir.
+  * Added CMake option to precompile all M routines, as part of build.
 
  -- Luis Ibanez <luis.ibanez at kitware.com>  Wed, 4 Jul 2012 17:16:45 -0500
diff --git a/debian/rules b/debian/rules
index f994e28..d866d05 100755
--- a/debian/rules
+++ b/debian/rules
@@ -59,6 +59,7 @@ cmake $(VISTA_TESTING_SOURCE_DIR)   \
 -DTEST_VISTA_SETUP:BOOL=ON \
 -DTEST_VISTA_FRESH:BOOL=ON \
 -DTEST_VISTA_FRESH_ALL:BOOL=ON \
+-DVISTA_PRECOMPILE_ALL_ROUTINES:BOOL=ON \
 -DTEST_VISTA_GTM_ROUTINE_DIR:STRING=$(VISTA_ROUTINES_DIR) \
 -DTEST_VISTA_FRESH_M_DIR:PATH=$(VISTA_M_WORKING_TREE) \
 -DTEST_VISTA_FRESH_GTM_ROUTINE_DIR:PATH=$(VISTA_ROUTINES_DIR) \

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/vista.git



More information about the debian-med-commit mailing list