From 5732169ff7ae40ebbed696e17ced22c8cb438587 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 20 Apr 2020 11:48:36 +0300 Subject: [PATCH] Include SalomeMacros.cmake with NO_POLICY_SCOPE to apply policies --- CMakeLists.txt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b138ff4..02a7e75a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,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() @@ -46,8 +46,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") - INCLUDE(SalomeMacros) FIND_PACKAGE(SalomeKERNEL REQUIRED) KERNEL_WITH_CORBA() # check whether KERNEL builded with CORBA ELSE(EXISTS ${KERNEL_ROOT_DIR}) @@ -58,7 +56,6 @@ ENDIF(EXISTS ${KERNEL_ROOT_DIR}) # =============== 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") FIND_PACKAGE(SalomeGUI REQUIRED) SALOME_GUI_WITH_CORBA() # check whether GUI builded with CORBA SALOME_GUI_MODE(OPTIONAL SALOME_USE_PYCONSOLE) @@ -111,7 +108,6 @@ MARK_AS_ADVANCED(FRONTTRACK_USE_TBB) # MEDCoupling 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") FIND_PACKAGE(SalomeMEDCoupling REQUIRED) # will reload HDF5, MEDFile, XDR, etc ... ELSE(EXISTS ${MEDCOUPLING_ROOT_DIR}) MESSAGE(FATAL_ERROR "We absolutely need the MEDCoupling tool, please define MEDCOUPLING_ROOT_DIR !") @@ -149,7 +145,6 @@ FIND_PACKAGE(SalomeOpenCASCADE REQUIRED) 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) ADD_DEFINITIONS(${GEOM_DEFINITIONS}) INCLUDE_DIRECTORIES(${GEOM_INCLUDE_DIRS}) @@ -162,7 +157,6 @@ ENDIF(EXISTS ${GEOM_ROOT_DIR}) SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR} CACHE PATH "Path to the Salome SMESH") IF(EXISTS ${SMESH_ROOT_DIR}) - LIST(APPEND CMAKE_MODULE_PATH "${SMESH_ROOT_DIR}/adm_local/cmake_files") FIND_PACKAGE(SalomeSMESH REQUIRED) ADD_DEFINITIONS(${SMESH_DEFINITIONS}) INCLUDE_DIRECTORIES(${SMESH_INCLUDE_DIRS}) -- 2.39.2