Commit 85a704f7 authored by Cédric Lachat's avatar Cédric Lachat

First commit

parents
This diff is collapsed.
SET(GMSH_PATH ${GMSH_HOME})
FIND_PATH(GMSH_INCLUDE_DIR discretRegion.h MVertex.h MTetrahedron.h GModel.h PATHS ${GMSH_PATH} PATH_SUFFIXES include include/gmsh)
FIND_LIBRARY(GMSH_LIBRARY NAMES Gmsh PATHS ${GMSH_PATH} PATH_SUFFIXES lib lib/gmsh)
IF (GMSH_INCLUDE_DIR AND GMSH_LIBRARY)
SET(GMSH_FOUND TRUE)
ENDIF (GMSH_INCLUDE_DIR AND GMSH_LIBRARY)
IF (GMSH_FOUND)
IF (NOT GMSH_FIND_QUIETLY)
MESSAGE(STATUS "Found GMSH : ${GMSH_LIBRARY}")
ENDIF (NOT GMSH_FIND_QUIETLY)
ELSE (GMSH_FOUND)
IF (GMSH_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find GMSH. You have to define variable GMSH_HOME")
ENDIF (GMSH_FIND_REQUIRED)
ENDIF (GMSH_FOUND)
MARK_AS_ADVANCED(GMSH_INCLUDE_DIR GMSH_LIBRARY)
## Copyright 2011-2017 Inria ##
#############################################################
##
## \file FindMMG3D.cmake
##
## \authors Cedric Lachat
##
##
## \date Version 1.0: from: 28 Nov 2011
## to: 22 Sep 2017
##
#############################################################
SET(MMG3D_PATH ${MMG3D_HOME})
FIND_PATH(MMG3D_INCLUDE_DIR libmmg3d.h PATHS ${MMG3D_PATH} PATH_SUFFIXES include)
FIND_LIBRARY(MMG3D_LIBRARY NAMES libmmg3d.a PATHS ${MMG3D_PATH} PATH_SUFFIXES lib)
IF (MMG3D_INCLUDE_DIR AND MMG3D_LIBRARY)
SET(MMG3D_FOUND TRUE)
ENDIF (MMG3D_INCLUDE_DIR AND MMG3D_LIBRARY)
IF (MMG3D_FOUND)
IF (NOT MMG3D_FIND_QUIETLY)
MESSAGE(STATUS "Found MMG3D : ${MMG3D_LIBRARY}")
ENDIF (NOT MMG3D_FIND_QUIETLY)
ELSE (MMG3D_FOUND)
IF (MMG3D_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find MMG3D. You have to define variable MMG3D_HOME")
ENDIF (MMG3D_FIND_REQUIRED)
ENDIF (MMG3D_FOUND)
MARK_AS_ADVANCED(MMG3D_INCLUDE_DIR MMG3D_LIBRARY)
set(MMG3D4_PATH ${MMG3D4_HOME})
FIND_PATH(MMG3D4_INCLUDE_DIR libmmg3d4.h PATHS ${MMG3D4_PATH} PATH_SUFFIXES include)
FIND_LIBRARY(MMG3D4_LIBRARY NAMES libmmg3d4.a PATHS ${MMG3D4_PATH} PATH_SUFFIXES lib)
if (PAMPA_MMG3D4_SCOTCH)
FIND_LIBRARY(SCOTCH_MMG3D4_LIBRARY NAMES libscotch.a PATHS ${MMG3D4_PATH} PATH_SUFFIXES lib)
endif (PAMPA_MMG3D4_SCOTCH)
IF (MMG3D4_INCLUDE_DIR AND MMG3D4_LIBRARY)
SET(MMG3D4_FOUND TRUE)
ENDIF (MMG3D4_INCLUDE_DIR AND MMG3D4_LIBRARY)
IF (MMG3D4_FOUND)
IF (NOT MMG3D4_FIND_QUIETLY)
MESSAGE(STATUS "Found MMG3D4 : ${MMG3D4_LIBRARY}")
ENDIF (NOT MMG3D4_FIND_QUIETLY)
ELSE (MMG3D4_FOUND)
IF (MMG3D4_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find MMG3D4. You have to define variable MMG3D4_HOME")
ENDIF (MMG3D4_FIND_REQUIRED)
ENDIF (MMG3D4_FOUND)
MARK_AS_ADVANCED(MMG3D4_INCLUDE_DIR MMG3D4_LIBRARY)
## Copyright 2017 Inria ##
#############################################################
##
## \file FindPAMPA-CORE-SRC.cmake
##
## \authors Cedric Lachat
##
##
## \date Version 1.0: from: 23 May 2017
## to: 25 Sep 2017
##
#############################################################
## Copyright 2009-2017 Inria
if (NOT ${PAMPA-CORE-SRC_PATH} STREQUAL ${PAMPA-CORE-SRC_HOME})
set (PAMPA-CORE-SRC_LIBRARY "NOTFOUND")
set (PAMPA-CORE-SRC_EXTRA_LIBRARY "NOTFOUND")
set (PAMPA-CORE-SRC_INCLUDE_DIR "NOTFOUND")
endif ()
set (PAMPA-CORE-SRC_PATH ${PAMPA-CORE-SRC_HOME} CACHE INTERNAL "")
find_path (PAMPA-CORE-SRC_INCLUDE_DIR NAMES library.h mesh.h dmesh.h HINTS ${PAMPA-CORE-SRC_PATH} PATH_SUFFIXES src/libpampa)
if (PAMPA-CORE-SRC_INCLUDE_DIR)
set (PAMPA-CORE-SRC_FOUND TRUE)
endif (PAMPA-CORE-SRC_INCLUDE_DIR)
if (PAMPA-CORE-SRC_FOUND)
if (NOT PAMPA-CORE-SRC_FIND_QUIETLY)
message (STATUS "Found PaMPA : ${PAMPA-CORE-SRC_LIBRARY}")
endif (NOT PAMPA-CORE-SRC_FIND_QUIETLY)
else (PAMPA-CORE-SRC_FOUND)
if (PAMPA-CORE-SRC_FIND_REQUIRED)
message (FATAL_ERROR "Could not find PaMPA source directory. You have to define variable PAMPA-CORE-SRC_HOME")
endif (PAMPA-CORE-SRC_FIND_REQUIRED)
endif (PAMPA-CORE-SRC_FOUND)
mark_as_advanced (PAMPA-CORE-SRC_INCLUDE_DIR)
## Copyright 2017 Inria ##
#############################################################
##
## \file FindPAMPA-CORE.cmake
##
## \authors Cedric Lachat
##
##
## \date Version 1.0: from: 23 May 2017
## to: 25 Sep 2017
##
#############################################################
## Copyright 2009-2017 Inria
if (NOT ${PAMPA-CORE_PATH} STREQUAL ${PAMPA-CORE_HOME})
set (PAMPA-CORE_LIBRARY "NOTFOUND")
set (PAMPA-CORE_EXTRA_LIBRARY "NOTFOUND")
set (PAMPA-CORE_INCLUDE_DIR "NOTFOUND")
endif ()
set (PAMPA-CORE_PATH ${PAMPA-CORE_HOME} CACHE INTERNAL "")
find_path (PAMPA-CORE_INCLUDE_DIR pampa.h HINTS ${PAMPA-CORE_PATH} PATH_SUFFIXES include)
find_library (PAMPA-CORE_LIBRARY NAMES pampa HINTS ${PAMPA-CORE_PATH} PATH_SUFFIXES lib)
find_library (PAMPA-CORE_EXTRA_LIBRARY NAMES pampaerr HINTS ${PAMPA-CORE_PATH} PATH_SUFFIXES lib)
if (PAMPA-CORE_INCLUDE_DIR AND PAMPA-CORE_LIBRARY AND PAMPA-CORE_EXTRA_LIBRARY)
set (PAMPA-CORE_FOUND TRUE)
endif (PAMPA-CORE_INCLUDE_DIR AND PAMPA-CORE_LIBRARY AND
PAMPA-CORE_EXTRA_LIBRARY)
if (PAMPA-CORE_FOUND)
if (NOT PAMPA-CORE_FIND_QUIETLY)
message (STATUS "Found PaMPA : ${PAMPA-CORE_LIBRARY}")
endif (NOT PAMPA-CORE_FIND_QUIETLY)
else (PAMPA-CORE_FOUND)
if (PAMPA-CORE_FIND_REQUIRED)
message (FATAL_ERROR "Could not find PaMPA. You have to define variable PAMPA-CORE_HOME")
endif (PAMPA-CORE_FIND_REQUIRED)
endif (PAMPA-CORE_FOUND)
mark_as_advanced (PAMPA-CORE_INCLUDE_DIR PAMPA-CORE_LIBRARY PAMPA-CORE_EXTRA_LIBRARY)
## Copyright 2017 Inria ##
#############################################################
##
## \file FindPAMPA.cmake
##
## \authors Cedric Lachat
##
##
## \date Version 1.0: from: 19 May 2017
## to: 25 Sep 2017
##
#############################################################
## Copyright 2009-2017 Inria
if (NOT ${PAMPA_SRC_PATH} STREQUAL ${PAMPA_SRC_HOME})
set (PAMPA_SRC_LIBRARY "NOTFOUND")
set (PAMPA_SRC_EXTRA_LIBRARY "NOTFOUND")
set (PAMPA_SRC_INCLUDE_DIR "NOTFOUND")
endif ()
set (PAMPA_SRC_PATH ${PAMPA_SRC_HOME} CACHE INTERNAL "")
find_path (PAMPA_SRC_INCLUDE_DIR pampaf.h HINTS ${PAMPA_SRC_PATH} PATH_SUFFIXES include)
find_library (PAMPA_SRC_LIBRARY NAMES pampa HINTS ${PAMPA_SRC_PATH} PATH_SUFFIXES lib)
find_library (PAMPA_SRC_EXTRA_LIBRARY NAMES pampaerr HINTS ${PAMPA_SRC_PATH} PATH_SUFFIXES lib)
if (PAMPA_SRC_INCLUDE_DIR AND PAMPA_SRC_LIBRARY AND PAMPA_SRC_EXTRA_LIBRARY)
set (PAMPA_SRC_FOUND TRUE)
endif (PAMPA_SRC_INCLUDE_DIR AND PAMPA_SRC_LIBRARY AND
PAMPA_SRC_EXTRA_LIBRARY)
if (PAMPA_SRC_FOUND)
if (NOT PAMPA_SRC_FIND_QUIETLY)
message (STATUS "Found PaMPA : ${PAMPA_SRC_LIBRARY}")
endif (NOT PAMPA_SRC_FIND_QUIETLY)
else (PAMPA_SRC_FOUND)
if (PAMPA_SRC_FIND_REQUIRED)
message (FATAL_ERROR "Could not find PaMPA. You have to define variable PAMPA_SRC_HOME")
endif (PAMPA_SRC_FIND_REQUIRED)
endif (PAMPA_SRC_FOUND)
mark_as_advanced (PAMPA_SRC_INCLUDE_DIR PAMPA_SRC_LIBRARY PAMPA_SRC_EXTRA_LIBRARY)
## Copyright 2009-2016 Inria
##
## This file is part of the PaMPA software package for parallel
## mesh partitioning and adaptation.
##
## PaMPA is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## any later version.
##
## PaMPA 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 General Public License for more details.
##
## In this respect, the user's attention is drawn to the risks associated
## with loading, using, modifying and/or developing or reproducing the
## software by the user in light of its specific status of free software,
## that may mean that it is complicated to manipulate, and that also
## therefore means that it is reserved for developers and experienced
## professionals having in-depth computer knowledge. Users are therefore
## encouraged to load and test the software's suitability as regards
## their requirements in conditions enabling the security of their
## systems and/or data to be ensured and, more generally, to use and
## operate it in the same conditions as regards security.
##
## The fact that you are presently reading this means that you have had
## knowledge of the GPLv3 license and that you accept its terms.
##
#############################################################
##
## \file FindPTSCOTCH.cmake
##
## \authors Cedric Lachat
##
## \brief This file is a part of the configuration
## to build PaMPA with CMake
##
## \date Version 1.0: from: 6 Jun 2011
## to: 30 Jun 2014
##
#############################################################
if (NOT ${PTSCOTCH_PATH} STREQUAL ${PTSCOTCH_HOME})
set (PTSCOTCH_LIBRARY "NOTFOUND")
set (SCOTCH_LIBRARY "NOTFOUND")
set (PTSCOTCH_EXTRA_LIBRARY "NOTFOUND")
set (PTSCOTCH_INCLUDE_DIR "NOTFOUND")
endif ()
set (PTSCOTCH_PATH ${PTSCOTCH_HOME} CACHE INTERNAL "")
find_path (PTSCOTCH_INCLUDE_DIR ptscotch${PTSCOTCH_SUFFIX}.h HINTS ${PTSCOTCH_PATH} PATH_SUFFIXES include)
find_library (PTSCOTCH_LIBRARY NAMES ptscotch${PTSCOTCH_SUFFIX} HINTS ${PTSCOTCH_PATH} PATH_SUFFIXES lib)
find_library (SCOTCH_LIBRARY NAMES scotch${PTSCOTCH_SUFFIX} HINTS ${PTSCOTCH_PATH} PATH_SUFFIXES lib)
find_library (PTSCOTCH_EXTRA_LIBRARY NAMES ptscotcherr${PTSCOTCH_SUFFIX} HINTS ${PTSCOTCH_PATH} PATH_SUFFIXES lib)
if (PTSCOTCH_INCLUDE_DIR AND PTSCOTCH_LIBRARY AND SCOTCH_LIBRARY AND PTSCOTCH_EXTRA_LIBRARY)
set (PTSCOTCH_FOUND TRUE)
endif (PTSCOTCH_INCLUDE_DIR AND PTSCOTCH_LIBRARY AND SCOTCH_LIBRARY AND
PTSCOTCH_EXTRA_LIBRARY)
if (PTSCOTCH_FOUND)
if (NOT PTSCOTCH_FIND_QUIETLY)
message (STATUS "Found PTSCOTCH : ${PTSCOTCH_LIBRARY}")
endif (NOT PTSCOTCH_FIND_QUIETLY)
else (PTSCOTCH_FOUND)
if (PTSCOTCH_FIND_REQUIRED)
message (FATAL_ERROR "Could not find PTSCOTCH. You have to define variable PTSCOTCH_HOME")
endif (PTSCOTCH_FIND_REQUIRED)
endif (PTSCOTCH_FOUND)
mark_as_advanced (PTSCOTCH_INCLUDE_DIR PTSCOTCH_LIBRARY SCOTCH_LIBRARY
PTSCOTCH_EXTRA_LIBRARY PTSCOTCH_SUFFIX)
## Copyright 2017 Inria ##
#############################################################
##
## \file FindSCOTCH.cmake
##
## \authors Cedric Lachat
##
##
## \date Version 1.0: from: 19 May 2017
## to: 22 Sep 2017
##
#############################################################
if (NOT ${SCOTCH_PATH} STREQUAL ${SCOTCH_HOME})
set (SCOTCH_LIBRARY "NOTFOUND")
set (SCOTCH_DEBUG_LIBRARY "NOTFOUND")
set (SCOTCH_RELEASE_LIBRARY "NOTFOUND")
set (SCOTCH_EXTRA_LIBRARY "NOTFOUND")
set (SCOTCH_INCLUDE_DIR "NOTFOUND")
endif ()
set (SCOTCH_PATH ${SCOTCH_HOME} CACHE INTERNAL "")
find_path (SCOTCH_INCLUDE_DIR scotchf${SCOTCH_SUFFIX}.h HINTS ${SCOTCH_PATH} PATH_SUFFIXES include)
find_library (SCOTCH_LIBRARY NAMES scotch${SCOTCH_SUFFIX} HINTS ${SCOTCH_PATH} PATH_SUFFIXES lib)
find_library (SCOTCH_EXTRA_LIBRARY NAMES scotcherr${SCOTCH_SUFFIX} HINTS ${SCOTCH_PATH} PATH_SUFFIXES lib)
if (SCOTCH_INCLUDE_DIR AND SCOTCH_LIBRARY AND SCOTCH_EXTRA_LIBRARY)
set (SCOTCH_FOUND TRUE)
endif (SCOTCH_INCLUDE_DIR AND SCOTCH_LIBRARY AND
SCOTCH_EXTRA_LIBRARY)
if (SCOTCH_FOUND)
if (NOT SCOTCH_FIND_QUIETLY)
message (STATUS "Found SCOTCH : ${SCOTCH_LIBRARY}")
endif (NOT SCOTCH_FIND_QUIETLY)
else (SCOTCH_FOUND)
if (SCOTCH_FIND_REQUIRED)
message (FATAL_ERROR "Could not find SCOTCH. You have to define variable SCOTCH_HOME")
endif (SCOTCH_FIND_REQUIRED)
endif (SCOTCH_FOUND)
find_library (SCOTCH_DEBUG_LIBRARY NAMES scotch${SCOTCH_SUFFIX}_debug PATHS ${SCOTCH_PATH} PATH_SUFFIXES lib)
if (NOT SCOTCH_DEBUG_LIBRARY)
set (SCOTCH_DEBUG_LIBRARY ${SCOTCH_LIBRARY})
endif (NOT SCOTCH_DEBUG_LIBRARY)
find_library (SCOTCH_RELEASE_LIBRARY NAMES scotch${SCOTCH_SUFFIX}_release PATHS ${SCOTCH_PATH} PATH_SUFFIXES lib)
if (NOT SCOTCH_RELEASE_LIBRARY)
set (SCOTCH_RELEASE_LIBRARY ${SCOTCH_LIBRARY})
endif (NOT SCOTCH_RELEASE_LIBRARY)
mark_as_advanced (SCOTCH_INCLUDE_DIR SCOTCH_LIBRARY SCOTCH_DEBUG_LIBRARY
SCOTCH_RELEASE_LIBRARY SCOTCH_EXTRA_LIBRARY SCOTCH_SUFFIX)
## Copyright 2009-2016 Inria
##
## This file is part of the PaMPA software package for parallel
## mesh partitioning and adaptation.
##
## PaMPA is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## any later version.
##
## PaMPA 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 General Public License for more details.
##
## In this respect, the user's attention is drawn to the risks associated
## with loading, using, modifying and/or developing or reproducing the
## software by the user in light of its specific status of free software,
## that may mean that it is complicated to manipulate, and that also
## therefore means that it is reserved for developers and experienced
## professionals having in-depth computer knowledge. Users are therefore
## encouraged to load and test the software's suitability as regards
## their requirements in conditions enabling the security of their
## systems and/or data to be ensured and, more generally, to use and
## operate it in the same conditions as regards security.
##
## The fact that you are presently reading this means that you have had
## knowledge of the GPLv3 license and that you accept its terms.
##
#############################################################
##
## \file run-partests.sh
##
## \authors Cedric Lachat
##
## \brief This file is a part of the configuration
## to build PaMPA with CMake
##
## \date Version 1.0: from: 18 Oct 2011
## to: 27 Sep 2012
##
#############################################################
#!/bin/bash
rm -f $4-*
$1 -n $2 $3 $4
cat $4-* > $4
diff $4 $5
## Copyright 2009-2016 Inria
##
## This file is part of the PaMPA software package for parallel
## mesh partitioning and adaptation.
##
## PaMPA is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## any later version.
##
## PaMPA 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 General Public License for more details.
##
## In this respect, the user's attention is drawn to the risks associated
## with loading, using, modifying and/or developing or reproducing the
## software by the user in light of its specific status of free software,
## that may mean that it is complicated to manipulate, and that also
## therefore means that it is reserved for developers and experienced
## professionals having in-depth computer knowledge. Users are therefore
## encouraged to load and test the software's suitability as regards
## their requirements in conditions enabling the security of their
## systems and/or data to be ensured and, more generally, to use and
## operate it in the same conditions as regards security.
##
## The fact that you are presently reading this means that you have had
## knowledge of the GPLv3 license and that you accept its terms.
##
#############################################################
##
## \file run-seqtests.sh
##
## \authors Cedric Lachat
##
## \brief This file is a part of the configuration
## to build PaMPA with CMake
##
## \date Version 1.0: from: 18 Oct 2011
## to: 6 Dec 2011
##
#############################################################
#!/bin/bash
rm -f $2
$1 $2
diff $2 $3
## Copyright 2009-2016 Inria
##
## This file is part of the PaMPA software package for parallel
## mesh partitioning and adaptation.
##
## PaMPA is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## any later version.
##
## PaMPA 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 General Public License for more details.
##
## In this respect, the user's attention is drawn to the risks associated
## with loading, using, modifying and/or developing or reproducing the
## software by the user in light of its specific status of free software,
## that may mean that it is complicated to manipulate, and that also
## therefore means that it is reserved for developers and experienced
## professionals having in-depth computer knowledge. Users are therefore
## encouraged to load and test the software's suitability as regards
## their requirements in conditions enabling the security of their
## systems and/or data to be ensured and, more generally, to use and
## operate it in the same conditions as regards security.
##
## The fact that you are presently reading this means that you have had
## knowledge of the GPLv3 license and that you accept its terms.
##
#############################################################
##
## \file software_version.sh
##
## \authors Cedric Lachat
##
## \brief This file is a part of the configuration
## to build PaMPA with CMake
##
## \date Version 1.0: from: 7 Jun 2013
## to: 5 Oct 2016
##
#############################################################
#!/bin/bash
opath=$( pwd )
echo "/* Generated file by $0 */" > $opath/versions_ext.h
echo -e "Searching versions for external tools..."
for i in $*; do
prgm=$( echo $i|awk -F: '{print $1}' )
echo -e "\tExternal tool:$prgm"
path=$( echo $i|awk -F: '{print $2}' )
files=$( echo $i|awk -F: '{print $3}'|sed -e 's/,/ /g' )
cd $path
res=$(git rev-parse 2>/dev/null)
if [ $? == 0 ];then
scm="git"
rev=$( git log --pretty=oneline --abbrev-commit --abbrev=10 -1|awk '{print $1}' )
# not commited files
notc=$( git diff HEAD --name-only|wc -l )
else
res=$(svn status 2>&1 |grep -v "not a working copy")
if [ $? == 0 ]; then
scm="svn"
#rev=$( svn log -l 1|grep "^r"|awk '{print $1}' )
rev=$( svn info|grep Revision|awk '{print $2}' )
# not commited files
notc=$( svn st|grep "^M"|wc -l )
else
scm="none"
rev="none"