From: vsr Date: Mon, 20 Apr 2020 10:53:00 +0000 (+0300) Subject: Include SalomeMacros.cmake with NO_POLICY_SCOPE to apply policies X-Git-Tag: V9_5_0b1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8ae36c815c4f939ed16a40444d2bccd73207228d;p=modules%2Fparavis.git Include SalomeMacros.cmake with NO_POLICY_SCOPE to apply policies --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 005c4d5f..890dd497 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ SET(${PROJECT_NAME_UC}_VERSION_DEV 1) SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files") IF(EXISTS ${CONFIGURATION_ROOT_DIR}) LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake") - INCLUDE(SalomeMacros) + INCLUDE(SalomeMacros NO_POLICY_SCOPE) ELSE() MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !") ENDIF() @@ -51,7 +51,6 @@ ENDIF() # =========== SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL") IF(EXISTS ${KERNEL_ROOT_DIR}) - LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files") FIND_PACKAGE(SalomeKERNEL REQUIRED) ADD_DEFINITIONS(${KERNEL_DEFINITIONS}) INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS}) @@ -107,7 +106,6 @@ ENDIF() # =================== SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI") IF(EXISTS ${GUI_ROOT_DIR}) - LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files") # We should skip detection of VTK (done automatically from GUI) as we need to detect ParaView instead; # otherwise ParaView targets are not found SET(OMIT_DETECT_PACKAGE_VTK ON) @@ -140,7 +138,6 @@ IF(SALOME_PARAVIS_BUILD_PLUGINS) IF(SALOME_PARAVIS_BUILD_CORBA_PLUGINS) SET(FIELDS_ROOT_DIR $ENV{FIELDS_ROOT_DIR} CACHE PATH "Path to the SALOME FIELDS module") IF(EXISTS ${FIELDS_ROOT_DIR}) - LIST(APPEND CMAKE_MODULE_PATH "${FIELDS_ROOT_DIR}/adm_local/cmake_files") FIND_PACKAGE(SalomeFIELDS) SALOME_LOG_OPTIONAL_PACKAGE(SalomeFIELDS SALOME_PARAVIS_BUILD_CORBA_PLUGINS) IF(SALOME_USE_MPI) @@ -149,9 +146,6 @@ IF(SALOME_PARAVIS_BUILD_PLUGINS) ENDIF() ELSE(SALOME_PARAVIS_BUILD_CORBA_PLUGINS) SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "Path to the MEDCoupling tool") - IF(EXISTS ${MEDCOUPLING_ROOT_DIR}) - LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files") - ENDIF() FIND_PACKAGE(SalomeMEDCoupling) # will load MEDFile SALOME_LOG_OPTIONAL_PACKAGE(MEDCoupling SALOME_PARAVIS_BUILD_PLUGINS) ENDIF() @@ -163,7 +157,6 @@ ENDIF(SALOME_PARAVIS_BUILD_PLUGINS) IF(SALOME_PARAVIS_BUILD_PLUGINS AND SALOME_PARAVIS_USE_GEOM_SOURCE) SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR} CACHE PATH "Path to the Salome GEOM") IF(EXISTS ${GEOM_ROOT_DIR}) - LIST(APPEND CMAKE_MODULE_PATH "${GEOM_ROOT_DIR}/adm_local/cmake_files") FIND_PACKAGE(SalomeGEOM REQUIRED COMPONENTS GEOMClient SalomeIDLGEOM OCC2VTK) ELSE() MESSAGE(WARNING "Salome GEOM is absolutely needed to import GEOM objects to PARAVIS. @@ -186,7 +179,6 @@ IF(SALOME_PARAVIS_BUILD_PLUGINS AND SALOME_PARAVIS_USE_SMESH_SOURCE) IF(NOT SALOME_PARAVIS_USE_GEOM_SOURCE) SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR} CACHE PATH "Path to the Salome GEOM") IF(EXISTS ${GEOM_ROOT_DIR}) - LIST(APPEND CMAKE_MODULE_PATH "${GEOM_ROOT_DIR}/adm_local/cmake_files") FIND_PACKAGE(SalomeGEOM REQUIRED COMPONENTS SalomeIDLGEOM ) ELSE() MESSAGE(WARNING "Salome GEOM is absolutely needed to import MESH objects to PARAVIS. @@ -198,7 +190,6 @@ IF(SALOME_PARAVIS_BUILD_PLUGINS AND SALOME_PARAVIS_USE_SMESH_SOURCE) ENDIF() SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR} CACHE PATH "Path to the Salome SMESH") IF(SALOME_PARAVIS_USE_GEOM_SOURCE AND EXISTS ${SMESH_ROOT_DIR}) - LIST(APPEND CMAKE_MODULE_PATH "${SMESH_ROOT_DIR}/adm_local/cmake_files") FIND_PACKAGE(SalomeSMESH REQUIRED) ELSE() MESSAGE(WARNING "Salome MESH is absolutely needed to import MESH objects to PARAVIS.