]> SALOME platform Git repositories - tools/libbatch.git/blob - CMakeModules/FindLocal.cmake
Salome HOME
Fixed errors in CMake FindXXX modules. Fixed Windows compilation errors.
[tools/libbatch.git] / CMakeModules / FindLocal.cmake
1 #  Copyright (C) 2007-2008  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 MACRO(FIND_LOCAL_COMMAND VAR COMMAND)
24     FIND_PROGRAM(${VAR} ${COMMAND})
25     IF (${VAR})
26         MESSAGE(STATUS "${COMMAND} found : ${${VAR}}")
27     ELSE (${VAR})
28         MESSAGE(STATUS "${COMMAND} not found, local submission might not work properly")
29         SET(${VAR} /bin/false)
30     ENDIF (${VAR})
31     MARK_AS_ADVANCED(${VAR})
32 ENDMACRO(FIND_LOCAL_COMMAND)
33
34 MESSAGE(STATUS "Looking for commands needed for local submission...")
35 FIND_LOCAL_COMMAND(RM rm)
36 FIND_LOCAL_COMMAND(SH sh)
37 FIND_LOCAL_COMMAND(CP cp)
38 FIND_LOCAL_COMMAND(RSH rsh)
39 FIND_LOCAL_COMMAND(RCP rcp)
40 FIND_LOCAL_COMMAND(SSH ssh)
41 FIND_LOCAL_COMMAND(SCP scp)