1 # Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License, or (at your option) any later version.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 MACRO(APPEND_CLASSES_TO_SRC_FILES)
24 FOREACH(CLASS ${ARGV})
25 LIST(APPEND SRC_FILES ${CLASS}.cxx)
26 ENDFOREACH(CLASS ${ARGV})
27 SET(SRC_FILES ${SRC_FILES} PARENT_SCOPE)
28 ENDMACRO(APPEND_CLASSES_TO_SRC_FILES)
30 MACRO(APPEND_CLASSES_TO_HDR_FILES)
31 FOREACH(CLASS ${ARGV})
32 LIST(APPEND HDR_FILES ${CLASS}.hxx)
33 ENDFOREACH(CLASS ${ARGV})
34 SET(HDR_FILES ${HDR_FILES} PARENT_SCOPE)
35 ENDMACRO(APPEND_CLASSES_TO_HDR_FILES)
38 ADD_DEFINITIONS(/wd4251 /wd4290) # Disable annoying Visual C++ warnings
41 INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}
42 ${PTHREAD_INCLUDE_DIR})
44 ADD_SUBDIRECTORY (Core)
46 IF (LIBBATCH_LOCAL_SUBMISSION)
47 ADD_SUBDIRECTORY (Local)
50 ADD_SUBDIRECTORY (CCC)
51 ADD_SUBDIRECTORY (LSF)
52 ADD_SUBDIRECTORY (PBS)
53 ADD_SUBDIRECTORY (OAR)
54 ADD_SUBDIRECTORY (COORM)
55 ADD_SUBDIRECTORY (SGE)
56 ADD_SUBDIRECTORY (LoadLeveler)
57 ADD_SUBDIRECTORY (Slurm)
59 # Vishnu is not available for Windows
61 ADD_SUBDIRECTORY (Vishnu)
64 ADD_LIBRARY (batch SHARED ${SRC_FILES})
66 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/Core)
67 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/Local)
68 TARGET_LINK_LIBRARIES(batch ${PTHREAD_LIBRARY})
71 TARGET_LINK_LIBRARIES(batch ws2_32)
74 # If necessary, activate all warnings (useful for debugging and code cleaning)
75 # add_definitions(-Wall -Werror -ansi -pedantic)
78 EXPORT LibBatchTargets
80 INSTALL(FILES ${HDR_FILES} DESTINATION include/libbatch)
82 IF (LIBBATCH_PYTHON_WRAPPING AND PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND AND SWIG_FOUND)
83 ADD_SUBDIRECTORY(Python)