]> SALOME platform Git repositories - modules/kernel.git/blob - src/Launcher/CMakeLists.txt
Salome HOME
changes for mpi compilation
[modules/kernel.git] / src / Launcher / CMakeLists.txt
1 # Copyright (C) 2012-2015  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 INCLUDE_DIRECTORIES(
21   ${LIBXML2_INCLUDE_DIR}
22   ${OMNIORB_INCLUDE_DIR}
23   ${PYTHON_INCLUDE_DIRS}
24   ${PTHREAD_INCLUDE_DIR}
25   ${MPI_CXX_INCLUDE_PATH}
26   ${LIBBATCH_INCLUDE_DIRS}
27   ${PROJECT_BINARY_DIR}/salome_adm
28   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
29   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
30   ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
31   ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
32   ${CMAKE_CURRENT_SOURCE_DIR}/../Registry
33   ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
34   ${CMAKE_CURRENT_SOURCE_DIR}/../Container
35   ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
36   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMESDS
37   ${PROJECT_BINARY_DIR}/idl
38 )
39
40 ADD_DEFINITIONS(${MPI_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
41 IF(SALOME_USE_LIBBATCH)
42   ADD_DEFINITIONS(-DWITH_LIBBATCH)
43 ENDIF(SALOME_USE_LIBBATCH)
44
45 # This local variable defines the list of dependant libraries common to all target in this package.
46 SET(COMMON_LIBS
47   Registry
48   SalomeNotification
49   SalomeContainer
50   SalomeResourcesManager
51   SalomeNS
52   OpUtil
53   SALOMELocalTrace
54   SALOMEBasics
55   SalomeIDLKernel
56   ${LIBBATCH_LIBRARIES}
57   ${MPI_CXX_LIBRARIES}
58   ${OMNIORB_LIBRARIES}
59   ${LIBXML2_LIBRARIES}
60   ${PYTHON_LIBRARIES}
61 )
62
63 SET(Launcher_SOURCES
64   SALOME_Launcher_Parser.cxx
65   SALOME_Launcher_Handler.cxx
66   Launcher_Job.cxx
67   Launcher_Job_Command.cxx
68   Launcher_Job_SALOME.cxx
69   Launcher_Job_PythonSALOME.cxx
70   Launcher_Job_YACSFile.cxx
71   Launcher.cxx
72   Launcher_XML_Persistence.cxx
73 )
74
75 ADD_LIBRARY(Launcher ${Launcher_SOURCES})
76 TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBRARIES} ${MPI_CXX_LIBRARIES} ${LIBXML2_LIBS})
77 INSTALL(TARGETS Launcher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
78
79 SET(TestLauncher_LIBS
80   ${LIBXML2_LIBRARIES}
81   ResourcesManager
82   Launcher
83   OpUtil
84   ${LIBBATCH_LIBRARIES}
85 )
86
87 ADD_EXECUTABLE(TestLauncher TestLauncher.cxx)
88 TARGET_LINK_LIBRARIES(TestLauncher ${TestLauncher_LIBS})
89 INSTALL(TARGETS TestLauncher DESTINATION ${SALOME_INSTALL_BINS})
90
91 IF(NOT SALOME_LAUNCHER_ONLY)
92   ADD_LIBRARY(SalomeLauncher BatchTest.cxx SALOME_Launcher.cxx)
93   TARGET_LINK_LIBRARIES(SalomeLauncher Launcher ${COMMON_LIBS})
94   INSTALL(TARGETS SalomeLauncher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
95   
96   SET(SALOME_LauncherServer_LIBS
97     Launcher
98     SalomeLauncher
99     SalomeSDS
100     SALOMEBasics
101     SALOMELocalTrace
102     ${LIBBATCH_LIBRARIES}
103     ${MPI_CXX_LIBRARIES}
104     ${OMNIORB_LIBRARIES}
105     ${LIBXML2_LIBRARIES}
106     ${PYTHON_LIBRARIES}
107   )
108
109   ADD_EXECUTABLE(SALOME_LauncherServer SALOME_LauncherServer.cxx)
110   TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SALOME_LauncherServer_LIBS})
111   INSTALL(TARGETS SALOME_LauncherServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
112 ENDIF()
113
114 SET(COMMON_HEADERS_HXX
115   BatchTest.hxx
116   Launcher.hxx
117   Launcher_Job.hxx
118   Launcher_Job_Command.hxx
119   Launcher_Job_PythonSALOME.hxx
120   Launcher_Job_SALOME.hxx
121   Launcher_Job_YACSFile.hxx
122   Launcher_Utils.hxx
123   SALOME_Launcher.hxx
124   SALOME_Launcher_Parser.hxx
125   SALOME_Launcher_defs.hxx
126 )
127 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})