From: mpa Date: Thu, 31 Oct 2013 11:40:09 +0000 (+0000) Subject: CMake: X-Git-Tag: V7_3_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=424b035fe0606b75e2cc3360b8b1bb127f9684d1;p=modules%2Fjobmanager.git CMake: - Accumulate environment variables, to be used later to run some command in proper environment. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5351a30..af69cb3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,6 +139,10 @@ MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED) MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC) MARK_AS_ADVANCED(SALOME_JOBMANAGER_INSTALL_RES_DATA) +# Accumulate environment variables for JOBMANAGER module +SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS}) +SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) + # Sources # ======== diff --git a/SalomeJOBMANAGERConfig.cmake.in b/SalomeJOBMANAGERConfig.cmake.in index d0af992..486dac4 100644 --- a/SalomeJOBMANAGERConfig.cmake.in +++ b/SalomeJOBMANAGERConfig.cmake.in @@ -46,6 +46,9 @@ SET_AND_CHECK(JOBMANAGER_INCLUDE_DIRS "${JOBMANAGER_ROOT_DIR_EXP}/@SALOME_INSTAL SET(JOBMANAGER_INCLUDE_DIRS "${JOBMANAGER_INCLUDE_DIRS};@_SalomeJOBMANAGER_EXTRA_HEADERS@") SET(JOBMANAGER_DEFINITIONS "@GUI_DEFINITIONS@") +# Package specific environment variables +@_SalomeJOBMANAGER_EXTRA_ENV_FULL@ + #### Now the specificities # Options exported by the package: diff --git a/adm_local/cmake_files/FindSalomeJOBMANAGER.cmake b/adm_local/cmake_files/FindSalomeJOBMANAGER.cmake index 166473e..ee289ba 100644 --- a/adm_local/cmake_files/FindSalomeJOBMANAGER.cmake +++ b/adm_local/cmake_files/FindSalomeJOBMANAGER.cmake @@ -29,3 +29,7 @@ SALOME_FIND_PACKAGE(SalomeJOBMANAGER SalomeJOBMANAGER CONFIG) IF(NOT SalomeJOBMANAGER_FIND_QUIETLY) MESSAGE(STATUS "Found Salome JOBMANAGER: ${JOBMANAGER_ROOT_DIR}") ENDIF() + +FOREACH(_res ${SalomeJOBMANAGER_EXTRA_ENV}) + SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeJOBMANAGER_EXTRA_ENV_${_res}}") +ENDFOREACH() \ No newline at end of file