From 663418a02929a1ec7b2e736130fbc653891820cc Mon Sep 17 00:00:00 2001 From: adam Date: Mon, 17 May 2010 09:44:33 +0000 Subject: [PATCH] *** empty log message *** --- salome_adm/cmake_files/FindPLATFORM.cmake | 3 - salome_adm/cmake_files/am2cmake.py | 76 ++++++++++++++++++----- 2 files changed, 59 insertions(+), 20 deletions(-) diff --git a/salome_adm/cmake_files/FindPLATFORM.cmake b/salome_adm/cmake_files/FindPLATFORM.cmake index 7f39eede8..01f1e1512 100644 --- a/salome_adm/cmake_files/FindPLATFORM.cmake +++ b/salome_adm/cmake_files/FindPLATFORM.cmake @@ -1,8 +1,5 @@ # Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index 63f1d3502..f48e27a36 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -1,9 +1,6 @@ # -*- coding: iso-8859-1 -*- # Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either @@ -445,20 +442,42 @@ class CMakeFile(object): """) pass else: - newlines.append(""" - SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR}) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) - """) + if self.module == "med": + newlines.append(""" + SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR}) + IF(KERNEL_ROOT_DIR) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) + ELSE(KERNEL_ROOT_DIR) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindPLATFORM.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindMPI.cmake) + ENDIF(KERNEL_ROOT_DIR) + """) + else: + newlines.append(""" + SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR}) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) + """) + pass if self.module == "gui": newlines.append(""" INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCAS.cmake) @@ -471,6 +490,7 @@ class CMakeFile(object): else: newlines.append(""" SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR}) + IF(GUI_ROOT_DIR) INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindCAS.cmake) INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQT4.cmake) INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindOPENGL.cmake) @@ -478,6 +498,7 @@ class CMakeFile(object): INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQWT.cmake) INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindGUI.cmake) + ENDIF(GUI_ROOT_DIR) """) if self.module == "med": newlines.append(""" @@ -485,6 +506,7 @@ class CMakeFile(object): IF(WINDOWS) INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindXDR.cmake) ENDIF(WINDOWS) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindMPI.cmake) """) pass if self.module == "smesh": @@ -592,7 +614,9 @@ class CMakeFile(object): pass elif self.module == "geom": newlines.append(""" + IF(GUI_ROOT_DIR) SET(GEOM_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) """) pass elif self.module == "medfile": @@ -608,41 +632,57 @@ class CMakeFile(object): pass elif self.module == "med": newlines.append(""" + IF(KERNEL_ROOT_DIR) SET(MED_ENABLE_KERNEL ON) IF(NOT WINDOWS) SET(MED_ENABLE_SPLITTER ON) ENDIF(NOT WINDOWS) + ENDIF(KERNEL_ROOT_DIR) + IF(GUI_ROOT_DIR) SET(MED_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) """) pass elif self.module == "smesh": newlines.append(""" + IF(GUI_ROOT_DIR) SET(SMESH_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) """) pass elif self.module == "netgenplugin": newlines.append(""" + IF(GUI_ROOT_DIR) SET(NETGENPLUGIN_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) """) pass elif self.module == "blsurfplugin": newlines.append(""" + IF(GUI_ROOT_DIR) SET(BLSURFPLUGIN_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) """) pass elif self.module == "ghs3dplugin": newlines.append(""" + IF(GUI_ROOT_DIR) SET(GHS3DPLUGIN_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) """) pass elif self.module == "hexoticplugin": newlines.append(""" + IF(GUI_ROOT_DIR) SET(HEXOTICPLUGIN_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) """) pass elif self.module == "ghs3dprlplugin": newlines.append(""" + IF(GUI_ROOT_DIR) SET(GHS3DPRLPLUGIN_ENABLE_GUI ON) + ENDIF(GUI_ROOT_DIR) """) pass elif self.module == "yacs": @@ -671,8 +711,10 @@ class CMakeFile(object): else: if self.module not in ["yacs"]: newlines.append(r''' + IF(KERNEL_ROOT_DIR) SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h) SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h) + ENDIF(KERNEL_ROOT_DIR) ''') pass pass -- 2.39.2