[med-svn] [vista] 01/01: Shared lib generation fixed by Brad King.

Luis Ibanez luisibanez-guest at moszumanska.debian.org
Tue Jan 28 20:01:18 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 f3eb8e2c567365c37d21165f46cf16ccb880bfe5
Author: Luis Ibanez <luis.ibanez at kitware.com>
Date:   Tue Jan 28 13:44:22 2014 -0500

    Shared lib generation fixed by Brad King.
    
    Brad fixed the cmake rules for generating the shared library with
    all the results of compiling all the VistA routines.
---
 CMake/ListOfVistARoutines.cmake |  2 +-
 CMakeLists.txt                  |  5 +++++
 Testing/Setup/CMakeLists.txt    | 22 +++++++++++-----------
 debian/rules                    |  2 ++
 4 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/CMake/ListOfVistARoutines.cmake b/CMake/ListOfVistARoutines.cmake
index 44ff73e..281d543 100644
--- a/CMake/ListOfVistARoutines.cmake
+++ b/CMake/ListOfVistARoutines.cmake
@@ -1,4 +1,4 @@
-set(TEST_VISTA_FRESH_GTM_ROUTINES_LIST
+list(APPEND TEST_VISTA_FRESH_GTM_ROUTINES_LIST
   A1B2ADM.m
   A1B2BGJ.m
   A1B2MAIN.m
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8c320f..bb174b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,11 @@ cmake_minimum_required(VERSION 2.8.0)
 project(VISTA NONE)
 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH})
 
+option(VISTA_PRECOMPILE_ALL_ROUTINES "Pre-compile all the M routines" OFF)
+if(VISTA_PRECOMPILE_ALL_ROUTINES)
+  enable_language(C)
+endif()
+
 include(CTest)
 
 # We do not install anything, so hide the install prefix option.
diff --git a/Testing/Setup/CMakeLists.txt b/Testing/Setup/CMakeLists.txt
index 0db6bce..6f3e96e 100644
--- a/Testing/Setup/CMakeLists.txt
+++ b/Testing/Setup/CMakeLists.txt
@@ -29,8 +29,6 @@ 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.")
@@ -68,25 +66,27 @@ if(VISTA_HAVE_BUILD_TOOL)
   add_custom_target(FreshVistA ${all} COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/ImportRG.cmake)
 
   if(VISTA_PRECOMPILE_ALL_ROUTINES)
-    add_custom_target(CompileMRoutines
-      DEPENDS FreshVistA
-      )
 
-    foreach(mroutine in ${TEST_VISTA_FRESH_GTM_ROUTINES_LIST} )
+    foreach(mroutine ${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
+      add_custom_command(
+        OUTPUT ${target_object_file_with_path}
+        DEPENDS ${source_routine_file_with_path}
         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()
+      list(APPEND list_of_object_files ${target_object_file_with_path})
+    endforeach(mroutine)
+
+    add_library(vista-foia SHARED ${list_of_object_files})
+    set_property(TARGET vista-foia PROPERTY LINKER_LANGUAGE C)
+    add_dependencies(vista-foia FreshVistA)
+
   endif()
 
 else()
diff --git a/debian/rules b/debian/rules
index d866d05..6b28b3a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,6 +19,7 @@ GTM_INSTALL_DIR=/usr/lib/fis-gtm/$(UAPIDIR)
 VISTA_GLOBALS_DIR=$(VISTAINSTANCEDIR)/g
 VISTA_ROUTINES_DIR=$(VISTAINSTANCEDIR)/r
 VISTA_OBJECTS_DIR=$(VISTAINSTANCEDIR)/o
+VISTA_LIBRARY_DIR=$(VISTAINSTANCEDIR)/lib
 VISTA_GTM_DATABASE=$(VISTAINSTANCEDIR)/g/database
 # The libgtmutil.so file only exist in the x64 architecture.
 # We need to add here the x86 alternative.
@@ -39,6 +40,7 @@ override_dh_auto_configure:
 	mkdir -p $(VISTA_TESTING_BINARY_DIR)
 	mkdir -p $(VISTA_ROUTINES_DIR)
 	mkdir -p $(VISTA_OBJECTS_DIR)
+	mkdir -p $(VISTA_LIBRARY_DIR)
 	mkdir -p $(VISTA_GLOBALS_DIR)
 	mkdir -p $(VISTAINSTANCEDIR)/inet
 	mkdir -p $(VISTAINSTANCEDIR)/inet/Logs

-- 
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