From: bruneton Date: Wed, 19 Jun 2013 07:20:32 +0000 (+0000) Subject: BUG: CMake: fixed improper setup of CMAKE_PREFIX_PATH in find macro X-Git-Tag: V2_1_0rc1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8e32b7e8494a1de5a9fc59316aae2e3e2bc9d372;p=tools%2Flibbatch.git BUG: CMake: fixed improper setup of CMAKE_PREFIX_PATH in find macro --- diff --git a/CMakeModules/FindLibbatchPython.cmake b/CMakeModules/FindLibbatchPython.cmake index e62d008..5c18bf7 100644 --- a/CMakeModules/FindLibbatchPython.cmake +++ b/CMakeModules/FindLibbatchPython.cmake @@ -47,7 +47,7 @@ IF(EXISTS "${PYTHON_ROOT_DIR}") MARK_AS_ADVANCED(Python_DIR) IF (NOT PYTHON_FOUND) - LIST(APPEND CMAKE_PREFIX_PATH "${PYTHON_ROOT_DIR}") + SET(CMAKE_PREFIX_PATH "${PYTHON_ROOT_DIR}") ELSE() MESSAGE(STATUS "Found Python in CONFIG mode!") ENDIF() diff --git a/CMakeModules/FindLocal.cmake b/CMakeModules/FindLocal.cmake deleted file mode 100644 index 3a216c5..0000000 --- a/CMakeModules/FindLocal.cmake +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -MACRO(FIND_LOCAL_COMMAND VAR UNIX_COMMAND WIN32_COMMAND) - IF (WIN32) - FIND_PROGRAM(${VAR} ${WIN32_COMMAND}) - ELSE (WIN32) - FIND_PROGRAM(${VAR} ${UNIX_COMMAND}) - ENDIF (WIN32) - IF (${VAR}) - MESSAGE(STATUS "${VAR} found : ${${VAR}}") - ELSE (${VAR}) - MESSAGE(STATUS "${VAR} not found, local submission might not work properly") - ENDIF (${VAR}) -ENDMACRO(FIND_LOCAL_COMMAND) - -MACRO(FIND_LOCAL_COMMAND_WIN32_DEF VAR UNIX_COMMAND WIN32_DEFAULT) - IF (WIN32) - SET(${VAR} ${WIN32_DEFAULT} CACHE STRING "${VAR}") - MESSAGE(STATUS "${VAR} found : using '${${VAR}}' (Windows default)") - ELSE (WIN32) - FIND_LOCAL_COMMAND(${VAR} ${UNIX_COMMAND} ${WIN32_DEFAULT}) - ENDIF (WIN32) -ENDMACRO(FIND_LOCAL_COMMAND_WIN32_DEF) - -MACRO(EVAL VAR) - IF(${ARGN}) - SET(${VAR} TRUE) - ELSE(${ARGN}) - SET(${VAR} FALSE) - ENDIF(${ARGN}) -ENDMACRO(EVAL) - -MESSAGE(STATUS "Looking for commands needed for local submission...") - -FIND_LOCAL_COMMAND_WIN32_DEF(RM_COMMAND rm del) -FIND_LOCAL_COMMAND(SH_COMMAND sh cmd.exe) -FIND_LOCAL_COMMAND_WIN32_DEF(CP_COMMAND cp copy) -FIND_LOCAL_COMMAND_WIN32_DEF(MKDIR_COMMAND mkdir mkdir) -FIND_LOCAL_COMMAND(RSH_COMMAND rsh rsh) -FIND_LOCAL_COMMAND(RCP_COMMAND rcp rcp) -FIND_LOCAL_COMMAND(SSH_COMMAND ssh plink) -FIND_LOCAL_COMMAND(SCP_COMMAND scp pscp) - -EVAL (HAS_SH SH_COMMAND AND CP_COMMAND AND RM_COMMAND AND MKDIR_COMMAND) -EVAL (HAS_RSH RSH_COMMAND AND RCP_COMMAND) -EVAL (HAS_SSH SSH_COMMAND AND SCP_COMMAND) diff --git a/CMakeModules/Summary.cmake b/CMakeModules/Summary.cmake deleted file mode 100644 index 467a74f..0000000 --- a/CMakeModules/Summary.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -MESSAGE(STATUS "") -MESSAGE(STATUS "**************** Summary ****************") -MESSAGE(STATUS "") -IF (BUILD_LOCAL_SUBMISSION) - MESSAGE(STATUS "Local submission .................... Yes") -ELSE (BUILD_LOCAL_SUBMISSION) - MESSAGE(STATUS "Local submission .......... Not requested") -ENDIF (BUILD_LOCAL_SUBMISSION) - -IF (BUILD_PYTHON_WRAPPING) - IF (PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND AND SWIG_FOUND) - MESSAGE(STATUS "Python wrapping ..................... Yes") - ELSE (PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND AND SWIG_FOUND) - MESSAGE(STATUS "Python wrapping ............... Not found") - ENDIF (PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND AND SWIG_FOUND) -ELSE (BUILD_PYTHON_WRAPPING) - MESSAGE(STATUS "Python wrapping ........... Not requested") -ENDIF (BUILD_PYTHON_WRAPPING) - -MESSAGE(STATUS "") -MESSAGE(STATUS "************** End Summary **************") -MESSAGE(STATUS "") diff --git a/CMakeModules/libbatchMacros.cmake b/CMakeModules/libbatchMacros.cmake index 1aecb98..3741aea 100644 --- a/CMakeModules/libbatchMacros.cmake +++ b/CMakeModules/libbatchMacros.cmake @@ -232,7 +232,7 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount) MARK_AS_ADVANCED(${pkg}_DIR) IF (NOT ${pkg_UC}_FOUND) - LIST(APPEND CMAKE_PREFIX_PATH "${${pkg_UC}_ROOT_DIR}") + SET(CMAKE_PREFIX_PATH "${${pkg_UC}_ROOT_DIR}") ELSE() MESSAGE(STATUS "Found ${pkg} in CONFIG mode!") ENDIF()