Salome HOME
Changed year in copyrights
[tools/libbatch.git] / CMakeLists.txt
1 #  Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
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.
10 #
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.
15 #
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
19 #
20 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22
23 project (libBatch)
24
25 cmake_minimum_required (VERSION 2.4)
26 set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules/)
27
28 find_package (PThread REQUIRED)
29 find_package (Makeinfo)
30
31 SET (BUILD_LSF_INTERFACE TRUE CACHE BOOL "Build interface for LSF batch system")
32 SET (BUILD_PBS_INTERFACE TRUE CACHE BOOL "Build interface for PBS batch system")
33 SET (BUILD_LOCAL_SUBMISSION TRUE CACHE BOOL "Build classes for local submission")
34 SET (BUILD_PYTHON_WRAPPING TRUE CACHE BOOL "Generate Python wrapping")
35 SET (TEST_ENABLED FALSE CACHE BOOL "Enable testing")
36
37 IF (TEST_ENABLED)
38     ENABLE_TESTING()
39 ENDIF (TEST_ENABLED)
40
41 IF (BUILD_LSF_INTERFACE)
42     find_package (LSF)
43 ENDIF (BUILD_LSF_INTERFACE)
44 IF (BUILD_PBS_INTERFACE)
45     find_package (PBS)
46 ENDIF (BUILD_PBS_INTERFACE)
47 IF (BUILD_LOCAL_SUBMISSION)
48     find_package (Local)
49 ENDIF (BUILD_LOCAL_SUBMISSION)
50 IF (BUILD_PYTHON_WRAPPING)
51     FIND_PACKAGE(Python)
52     FIND_PACKAGE(SWIG)
53 ENDIF (BUILD_PYTHON_WRAPPING)
54
55 SET(CPACK_GENERATOR TGZ)
56 SET(CPACK_SOURCE_GENERATOR TGZ ZIP)
57 SET(CPACK_PACKAGE_VERSION_MAJOR 1)
58 SET(CPACK_PACKAGE_VERSION_MINOR 3)
59 SET(CPACK_PACKAGE_VERSION_PATCH 0)
60 SET(CPACK_SOURCE_IGNORE_FILES /\\\\.;/CVS/;~)
61 SET(CPACK_SOURCE_PACKAGE_FILE_NAME
62     ${PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
63
64 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Batch_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Batch_config.h)
65
66 INCLUDE(Summary)
67
68 add_subdirectory (src)
69
70 IF (Makeinfo_FOUND)
71     add_subdirectory (doc)
72 ENDIF (Makeinfo_FOUND)
73
74 add_subdirectory (misc)
75
76 INCLUDE(CPack)
77
78 MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY EXECUTABLE_OUTPUT_PATH)