1 # Copyright (C) 2007-2013 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.
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(${PTHREAD_INCLUDE_DIR})
43 add_subdirectory (Core)
45 IF (BUILD_LOCAL_SUBMISSION)
46 add_subdirectory (Local)
47 ENDIF (BUILD_LOCAL_SUBMISSION)
49 add_subdirectory (CCC)
50 add_subdirectory (LSF)
51 add_subdirectory (PBS)
52 add_subdirectory (OAR)
53 add_subdirectory (COORM)
54 add_subdirectory (SGE)
55 add_subdirectory (LoadLeveler)
56 add_subdirectory (Slurm)
58 # Vishnu is not available for Windows
60 add_subdirectory (Vishnu)
63 add_library(batch SHARED ${SRC_FILES})
65 include_directories(${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Core)
66 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Local)
67 target_link_libraries(batch ${PTHREAD_LIBRARY})
70 target_link_libraries(batch ws2_32)
73 # If necessary, activate all warnings (useful for debugging and code cleaning)
74 # add_definitions(-Wall -Werror -ansi -pedantic)
76 INSTALL(TARGETS batch DESTINATION lib)
77 INSTALL(FILES ${HDR_FILES} DESTINATION include/libbatch)
79 IF (BUILD_PYTHON_WRAPPING AND PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND AND SWIG_FOUND)
80 add_subdirectory (Python)
81 ENDIF (BUILD_PYTHON_WRAPPING AND PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND AND SWIG_FOUND)