From: inv Date: Wed, 30 Oct 2013 17:12:28 +0000 (+0000) Subject: Synchronize adm files X-Git-Tag: V7_3_0a1~42 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=82779be5d7e3daafbeea5013a732327a7779e19a;p=modules%2Fmed.git Synchronize adm files --- diff --git a/adm_local_without_kernel/cmake_files/FindGraphviz.cmake b/adm_local_without_kernel/cmake_files/FindGraphviz.cmake index 1398eb6b7..6eb1e5a71 100644 --- a/adm_local_without_kernel/cmake_files/FindGraphviz.cmake +++ b/adm_local_without_kernel/cmake_files/FindGraphviz.cmake @@ -34,11 +34,11 @@ FIND_PROGRAM(GRAPHVIZ_EXECUTABLE dot) FIND_PATH(GRAPHVIZ_INCLUDE_DIR NAMES graphviz/graph.h) SET(GRAPHVIZ_INCLUDE_DIRS ${GRAPHVIZ_INCLUDE_DIR} ${GRAPHVIZ_INCLUDE_DIR}/graphviz) -FIND_LIBRARY(GRAPHVIZ_cdt_LIBRARY NAMES cdt) -FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY NAMES cgraph) -FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY NAMES graph) -FIND_LIBRARY(GRAPHVIZ_gvc_LIBRARY NAMES gvc) -FIND_LIBRARY(GRAPHVIZ_pathplan_LIBRARY NAMES pathplan) +FIND_LIBRARY(GRAPHVIZ_cdt_LIBRARY NAMES cdt PATH_SUFFIXES bin) +FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY NAMES cgraph PATH_SUFFIXES bin) +FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY NAMES graph PATH_SUFFIXES bin) +FIND_LIBRARY(GRAPHVIZ_gvc_LIBRARY NAMES gvc PATH_SUFFIXES bin) +FIND_LIBRARY(GRAPHVIZ_pathplan_LIBRARY NAMES pathplan PATH_SUFFIXES bin) SET(GRAPHVIZ_LIBRARIES ${GRAPHVIZ_cdt_LIBRARY} diff --git a/adm_local_without_kernel/cmake_files/FindSalomeBoost.cmake b/adm_local_without_kernel/cmake_files/FindSalomeBoost.cmake index f25767218..df3d85464 100644 --- a/adm_local_without_kernel/cmake_files/FindSalomeBoost.cmake +++ b/adm_local_without_kernel/cmake_files/FindSalomeBoost.cmake @@ -47,6 +47,5 @@ ENDIF() IF(Boost_FOUND OR BOOST_FOUND) SALOME_ACCUMULATE_HEADERS(Boost_INCLUDE_DIRS) - SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${BOOST_ROOT_DIR}/lib) - SALOME_ACCUMULATE_ENVIRONMENT(PATH ${BOOST_ROOT_DIR}/include) + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${Boost_LIBRARIES}) ENDIF() \ No newline at end of file diff --git a/adm_local_without_kernel/cmake_files/FindSalomeDoxygen.cmake b/adm_local_without_kernel/cmake_files/FindSalomeDoxygen.cmake index 511d81bc4..9da127e35 100644 --- a/adm_local_without_kernel/cmake_files/FindSalomeDoxygen.cmake +++ b/adm_local_without_kernel/cmake_files/FindSalomeDoxygen.cmake @@ -40,5 +40,5 @@ ENDIF() MARK_AS_ADVANCED(DOXYGEN_SUPPORT_STL) IF(DOXYGEN_FOUND) - SALOME_ACCUMULATE_ENVIRONMENT(PATH ${DOXYGEN_ROOT_DIR}/bin) + SALOME_ACCUMULATE_ENVIRONMENT(PATH ${DOXYGEN_EXECUTABLE}) ENDIF() diff --git a/adm_local_without_kernel/cmake_files/FindSalomeGraphviz.cmake b/adm_local_without_kernel/cmake_files/FindSalomeGraphviz.cmake index bbefabff2..ad3c3c499 100644 --- a/adm_local_without_kernel/cmake_files/FindSalomeGraphviz.cmake +++ b/adm_local_without_kernel/cmake_files/FindSalomeGraphviz.cmake @@ -28,7 +28,6 @@ SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Graphviz GRAPHVIZ_EXECUTABLE GRAPHVIZ_L MARK_AS_ADVANCED(GRAPHVIZ_EXECUTABLE GRAPHVIZ_LIBRARIES GRAPHVIZ_INCLUDE_DIRS) IF(GRAPHVIZ_FOUND) - SALOME_ACCUMULATE_ENVIRONMENT(PATH ${GRAPHVIZ_ROOT_DIR}/bin) - SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${GRAPHVIZ_ROOT_DIR}/lib - ${GRAPHVIZ_ROOT_DIR}/lib/graphviz) + SALOME_ACCUMULATE_ENVIRONMENT(PATH ${GRAPHVIZ_EXECUTABLE}) + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${GRAPHVIZ_LIBRARIES}) ENDIF() \ No newline at end of file diff --git a/adm_local_without_kernel/cmake_files/FindSalomeHDF5.cmake b/adm_local_without_kernel/cmake_files/FindSalomeHDF5.cmake index de7dc234d..6b227faf7 100644 --- a/adm_local_without_kernel/cmake_files/FindSalomeHDF5.cmake +++ b/adm_local_without_kernel/cmake_files/FindSalomeHDF5.cmake @@ -27,9 +27,12 @@ # MPI root directory used for HDF5 compilation is exposed into MPI_ROOT_DIR_EXP # +SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to the HDF5.") + if(WIN32) set(PREV_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) set(CMAKE_FIND_LIBRARY_SUFFIXES dll${CMAKE_IMPORT_LIBRARY_SUFFIX}) + set(CMAKE_LIBRARY_PATH ${HDF5_ROOT_DIR}/dll) endif() SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(HDF5 HDF5_INCLUDE_DIR 1) @@ -86,6 +89,5 @@ endif() IF(HDF5_FOUND) SALOME_ACCUMULATE_HEADERS(HDF5_INCLUDE_DIRS) - SALOME_ACCUMULATE_ENVIRONMENT(PATH ${HDF5_ROOT_DIR}/bin) - SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${HDF5_ROOT_DIR}/lib) + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${HDF5_LIBRARIES}) ENDIF() diff --git a/adm_local_without_kernel/cmake_files/FindSalomeLibXml2.cmake b/adm_local_without_kernel/cmake_files/FindSalomeLibXml2.cmake index 60c4dbcd5..4c760e162 100644 --- a/adm_local_without_kernel/cmake_files/FindSalomeLibXml2.cmake +++ b/adm_local_without_kernel/cmake_files/FindSalomeLibXml2.cmake @@ -30,6 +30,5 @@ ENDIF() IF(LIBXML2_FOUND) SALOME_ACCUMULATE_HEADERS(LIBXML2_INCLUDE_DIR) - SALOME_ACCUMULATE_ENVIRONMENT(PATH ${LIBXML2_ROOT_DIR}/bin) - SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${LIBXML2_ROOT_DIR}/lib) + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${LIBXML2_LIBRARIES}) ENDIF() diff --git a/adm_local_without_kernel/cmake_files/FindSalomeMEDFile.cmake b/adm_local_without_kernel/cmake_files/FindSalomeMEDFile.cmake index 9777406b2..7180826e2 100644 --- a/adm_local_without_kernel/cmake_files/FindSalomeMEDFile.cmake +++ b/adm_local_without_kernel/cmake_files/FindSalomeMEDFile.cmake @@ -29,6 +29,5 @@ SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MEDFile MEDFILE_INCLUDE_DIRS 1) IF(MEDFILE_FOUND) SALOME_ACCUMULATE_HEADERS(MEDFILE_INCLUDE_DIRS) - SALOME_ACCUMULATE_ENVIRONMENT(PATH ${MEDFILE_ROOT_DIR}/bin) - SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${MEDFILE_ROOT_DIR}/lib) + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${MEDFILE_LIBRARIES}) ENDIF() \ No newline at end of file diff --git a/adm_local_without_kernel/cmake_files/FindSalomeMPI.cmake b/adm_local_without_kernel/cmake_files/FindSalomeMPI.cmake index 8741b5df0..4a5dbaaaa 100644 --- a/adm_local_without_kernel/cmake_files/FindSalomeMPI.cmake +++ b/adm_local_without_kernel/cmake_files/FindSalomeMPI.cmake @@ -32,6 +32,5 @@ SET(MPI_LIBRARIES ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES}) IF(MPI_FOUND) SALOME_ACCUMULATE_HEADERS(MPI_INCLUDE_DIRS) - SALOME_ACCUMULATE_ENVIRONMENT(PATH ${MPI_ROOT_DIR}/bin) - SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${MPI_ROOT_DIR}/lib) + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${MPI_LIBRARIES}) ENDIF() diff --git a/adm_local_without_kernel/cmake_files/FindSalomeSWIG.cmake b/adm_local_without_kernel/cmake_files/FindSalomeSWIG.cmake index 85786497d..8d2cb42c4 100644 --- a/adm_local_without_kernel/cmake_files/FindSalomeSWIG.cmake +++ b/adm_local_without_kernel/cmake_files/FindSalomeSWIG.cmake @@ -27,5 +27,5 @@ SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2) MARK_AS_ADVANCED(SWIG_EXECUTABLE SWIG_VERSION) IF(SWIG_FOUND) - SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SWIG_ROOT_DIR}/bin) + SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SWIG_EXECUTABLE}) ENDIF() diff --git a/adm_local_without_kernel/cmake_files/FindSphinx.cmake b/adm_local_without_kernel/cmake_files/FindSphinx.cmake index 8e05c7a73..f06933ab1 100644 --- a/adm_local_without_kernel/cmake_files/FindSphinx.cmake +++ b/adm_local_without_kernel/cmake_files/FindSphinx.cmake @@ -30,7 +30,7 @@ # ########################################################################### -FIND_PROGRAM(SPHINX_EXECUTABLE sphinx-build) +FIND_PROGRAM(SPHINX_EXECUTABLE sphinx-build PATH_SUFFIXES Scripts) # Handle the standard arguments of the find_package() command: INCLUDE(FindPackageHandleStandardArgs) diff --git a/adm_local_without_kernel/cmake_files/SalomeMacros.cmake b/adm_local_without_kernel/cmake_files/SalomeMacros.cmake index 4d1bc6a1b..658e3f688 100755 --- a/adm_local_without_kernel/cmake_files/SalomeMacros.cmake +++ b/adm_local_without_kernel/cmake_files/SalomeMacros.cmake @@ -655,23 +655,49 @@ ENDMACRO(SALOME_ACCUMULATE_HEADERS) # 2. Full list of environment variable names is stored in CMake variable # _${PROJECT_NAME}_EXTRA_ENV. # +# Notes: +# - The arguments list can include optional CHECK or NOCHECK keywords: +# * For all arguments following CHECK keyword the macro perform an +# additional check (see below); this is the default mode, it is suitable +# for path variables (PATH, LD_LIBRARY_PATH, etc). +# * For all arguments following NOCHECK keyword, no additional check is +# performed. +# Checking an argument means that we check: +# - That the path actually exists +# - That this is not a standard system path (starting with "/usr"); this avoids +# polluting LD_LIBRARY_PATH or PATH with things like "/usr/lib64" ... +# MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar) + SET(_is_check ON) FOREACH(_item ${ARGN}) - IF(EXISTS ${_item}) - IF(IS_DIRECTORY ${_item}) + IF(${_item} STREQUAL "NOCHECK") + SET(_is_check OFF) + ELSEIF(${_item} STREQUAL "CHECK") + SET(_is_check ON) + ELSE() + IF(_is_check) + IF(NOT IS_DIRECTORY ${_item}) + IF(TARGET ${_item}) + GET_TARGET_PROPERTY(_item ${_item} LOCATION) + ENDIF() + GET_FILENAME_COMPONENT(_item ${_item} PATH) + ENDIF() + IF(EXISTS ${_item}) + STRING(REGEX MATCH "^/usr" _usr_find ${_item}) + LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res) + IF(NOT _usr_find AND _res EQUAL -1) + LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item}) + ENDIF() + ENDIF() + ELSE(_is_check) LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res) - IF(_res EQUAL -1) + IF( _res EQUAL -1) LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item}) - ENDIF() - ELSE() - GET_FILENAME_COMPONENT(_path_dir ${_item} PATH) - LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_path_dir} _res) - IF(_res EQUAL -1) - LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_path_dir}) - ENDIF() - ENDIF() - ENDIF() + ENDIF() + ENDIF(_is_check) + ENDIF() ENDFOREACH() + LIST(FIND _${PROJECT_NAME}_EXTRA_ENV ${envvar} _res) IF(_res EQUAL -1) LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV ${envvar}) @@ -717,7 +743,7 @@ MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts) IF(${_item} STREQUAL "LD_LIBRARY_PATH") SET(_item PATH) ENDIF() - STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val}\;%${_item}%\n") + STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n") SET(_ext "bat") SET(_call_cmd "call") ELSE(WIN32)