...
 
Commits (33)
image: hpclib/hiepacs
stages:
- build
- test
- analysis
build_pampa:
stage: build
artifacts:
expire_in: 42 minutes
untracked: true
script:
- cd build
- scan-build -plist --intercept-first --analyze-headers -o ../analyzer_reports
cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_C_FLAGS="-O0 -g -fPIC --coverage -Wall -fdiagnostics-show-option" -DCMAKE_EXE_LINKER_FLAGS="--coverage"
- scan-build -plist --intercept-first --analyze-headers -o ../analyzer_reports make -j5 2>&1 | tee ../pampa-build.log
only:
- branches
- master@PaMPA/PaMPA
build_pampa_doc:
stage: build
artifacts:
expire_in: 42 minutes
untracked: true
script:
- cd build
- cmake .. -DPAMPA_BUILD_DOC=ON
- make -j5 doc 2>&1 > pampa-build-doc.log
only:
- branches
- master@PaMPA/PaMPA
test_pampa:
stage: test
dependencies:
- build_pampa
artifacts:
expire_in: 42 minutes
paths:
- pampa-coverage.xml
script:
- cd build
- make test
- cd ..
- lcov --directory build --capture --output-file pampa.lcov
- lcov_cobertura.py pampa.lcov --output pampa-coverage.xml
only:
- branches
- master@PaMPA/PaMPA
sonar:
stage: analysis
dependencies:
- build_pampa
- test_pampa
artifacts:
expire_in: 1 day
paths:
- pampa-cppcheck.xml
- pampa-rats.xml
- sonar-project.properties
- sonar.log
script:
- ./ext/analysis.sh
- sonar-scanner -X > sonar.log
only:
- master@PaMPA/PaMPA
This diff is collapsed.
###
#
# @copyright (c) 2018 Inria. All rights reserved.
#
###
#
# @file FindCommon.cmake
#
# @project MORSE
# MORSE is a software package provided by:
# Inria Bordeaux - Sud-Ouest,
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
#
# @version 1.0.0
# @author Florent Pruvost
# @date 13-04-2018
#
###
# clean these variables before using them in CMAKE_REQUIRED_* variables in
# check_function_exists
macro(finds_remove_duplicates)
if (REQUIRED_DEFINITIONS)
list(REMOVE_DUPLICATES REQUIRED_DEFINITIONS)
endif()
if (REQUIRED_INCDIRS)
list(REMOVE_DUPLICATES REQUIRED_INCDIRS)
endif()
if (REQUIRED_FLAGS)
list(REMOVE_DUPLICATES REQUIRED_FLAGS)
endif()
if (REQUIRED_LDFLAGS)
list(REMOVE_DUPLICATES REQUIRED_LDFLAGS)
endif()
if (REQUIRED_LIBS)
list(REVERSE REQUIRED_LIBS)
list(REMOVE_DUPLICATES REQUIRED_LIBS)
list(REVERSE REQUIRED_LIBS)
endif()
endmacro()
##
## @end file FindCommon
##
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 (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-2014 Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
#
# @file FindHeadersAndLibs.cmake
#
# @project MORSE
# MORSE is a software package provided by:
# Inria Bordeaux - Sud-Ouest,
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
#
# @version 0.9.0
# @author Cedric Castagnede
# @author Emmanuel Agullo
# @author Mathieu Faverge
# @author Florent Pruvost
# @date 13-07-2012
#
###
# Some macros to print status when search for headers and libs
include(PrintFindStatus)
function(FindHeader _libname _header_to_find)
# save _libname upper and lower case
string(TOUPPER ${_libname} LIBNAME)
string(TOLOWER ${_libname} libname)
# Looking for include
# -------------------
# Add system include paths to search include
# ------------------------------------------
unset(_inc_env)
if(WIN32)
string(REPLACE ":" ";" _inc_env "$ENV{INCLUDE}")
else()
string(REPLACE ":" ";" _path_env "$ENV{INCLUDE}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{C_INCLUDE_PATH}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{CPATH}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{INCLUDE_PATH}")
list(APPEND _inc_env "${_path_env}")
endif()
list(APPEND _inc_env "${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}")
list(REMOVE_DUPLICATES _inc_env)
# Try to find the _header_to_find in the given paths
# --------------------------------------------------
# call cmake macro to find the header path
if(${LIBNAME}_INCDIR)
set(${LIBNAME}_${_header_to_find}_DIRS "${LIBNAME}_${_header_to_find}_DIRS-NOTFOUND")
find_path(${LIBNAME}_${_header_to_find}_DIRS
NAMES ${_header_to_find}
HINTS ${${LIBNAME}_INCDIR})
elseif(${LIBNAME}_DIR)
set(${LIBNAME}_${_header_to_find}_DIRS "${LIBNAME}_${_header_to_find}_DIRS-NOTFOUND")
find_path(${LIBNAME}_${_header_to_find}_DIRS
NAMES ${_header_to_find}
HINTS ${${LIBNAME}_DIR}
PATH_SUFFIXES include)
else()
set(${LIBNAME}_${_header_to_find}_DIRS "${LIBNAME}_${_header_to_find}_DIRS-NOTFOUND")
find_path(${LIBNAME}_${_header_to_find}_DIRS
NAMES ${_header_to_find}
HINTS ${_inc_env})
endif()
mark_as_advanced(${LIBNAME}_${_header_to_find}_DIRS)
# Print status if not found
# -------------------------
if (NOT ${LIBNAME}_${_header_to_find}_DIRS)
Print_Find_Header_Status(${libname} ${_header_to_find})
endif ()
endfunction(FindHeader)
##
## @end file FindHeadersAndLibs.cmake
##
###
#
# @copyright (c) 2018 Inria. All rights reserved.
#
###
#
# @file FindInit.cmake
#
# @project MORSE
# MORSE is a software package provided by:
# Inria Bordeaux - Sud-Ouest,
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
#
# @version 1.0.0
# @author Florent Pruvost
# @date 24-04-2018
#
###
# This include is required to check symbols of libs
include(CheckFunctionExists)
# This include is required to check defines in headers
include(CheckIncludeFiles)
# Factorize some piece of code
include(FindCommon)
# To find headers and libs
include(FindHeadersAndLibs)
# To transform relative path into absolute for a list of libraries
include(LibrariesAbsolutePath)
include(FindPkgconfigLibrariesAbsolutePath)
# Some macros to print status when search for headers and libs
include(PrintFindStatus)
##
## @end file FindInit.cmake
##
## 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)
This diff is collapsed.
###
#
# @copyright (c) 2018 Inria. All rights reserved.
#
###
#
# @file FindPkgconfigLibrariesAbsolutePath.cmake
#
# @project MORSE
# MORSE is a software package provided by:
# Inria Bordeaux - Sud-Ouest,
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
#
# @version 1.0.0
# @author Florent Pruvost
# @date 06-04-2018
#
###
# Transform relative path into absolute path for libraries found with the
# pkg_search_module cmake macro
# _prefix: the name of the CMake variable used when pkg_search_module was called
# e.g. for pkg_search_module(BLAS blas) _prefix would be BLAS
macro(FIND_PKGCONFIG_LIBRARIES_ABSOLUTE_PATH _prefix)
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
# non static case
set(${_prefix}_LIBRARIES_COPY "${${_prefix}_LIBRARIES}")
set(${_prefix}_LIBRARIES "")
foreach(_library ${${_prefix}_LIBRARIES_COPY})
if(EXISTS "${_library}")
list(APPEND ${_prefix}_LIBRARIES ${_library})
else()
get_filename_component(_ext "${_library}" EXT)
set(_lib_extensions ".so" ".a" ".dyld" ".dll")
list(FIND _lib_extensions "${_ext}" _index)
if (${_index} GREATER -1)
get_filename_component(_library "${_library}" NAME_WE)
endif()
find_library(_library_path NAMES ${_library}
HINTS ${${_prefix}_LIBDIR} ${${_prefix}_LIBRARY_DIRS} ${_lib_env})
if (_library_path)
list(APPEND ${_prefix}_LIBRARIES ${_library_path})
else()
message(FATAL_ERROR "Dependency of ${_prefix} '${_library}' NOT FOUND")
endif()
unset(_library_path CACHE)
endif()
endforeach()
set (${_prefix}_LIBRARIES "${${_prefix}_LIBRARIES}" CACHE INTERNAL "" FORCE)
## static case
#set(${_prefix}_STATIC_LIBRARIES_COPY "${${_prefix}_STATIC_LIBRARIES}")
#set(${_prefix}_STATIC_LIBRARIES "")
#foreach(_library ${${_prefix}_STATIC_LIBRARIES_COPY})
# if(EXISTS "${_library}")
# list(APPEND ${_prefix}_STATIC_LIBRARIES ${_library})
# else()
# get_filename_component(_ext "${_library}" EXT)
# set(_lib_extensions ".so" ".a" ".dyld" ".dll")
# list(FIND _lib_extensions "${_ext}" _index)
# if (${_index} GREATER -1)
# get_filename_component(_library "${_library}" NAME_WE)
# endif()
# # try static first
# set (default_find_library_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
# set (CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
# find_library(_library_path NAMES ${_library}
# HINTS ${${_prefix}_STATIC_LIBDIR} ${${_prefix}_STATIC_LIBRARY_DIRS} ${_lib_env})
# set (CMAKE_FIND_LIBRARY_SUFFIXES ${default_find_library_suffixes})
# # if not found try dynamic
# if (NOT _library_path)
# find_library(_library_path NAMES ${_library}
# HINTS ${${_prefix}_STATIC_LIBDIR} ${${_prefix}_STATIC_LIBRARY_DIRS} ${_lib_env})
# endif()
# if (_library_path)
# list(APPEND ${_prefix}_STATIC_LIBRARIES ${_library_path})
# else()
# message(FATAL_ERROR "Dependency of ${_prefix} '${_library}' NOT FOUND")
# endif()
# unset(_library_path CACHE)
# endif()
#endforeach()
#set (${_prefix}_STATIC_LIBRARIES "${${_prefix}_STATIC_LIBRARIES}" CACHE INTERNAL "" FORCE)
endmacro()
##
## @end file FindPkgconfigLibrariesAbsolutePath.cmake
##
This diff is collapsed.
###
#
# @copyright (c) 2018 Inria. All rights reserved.
#
###
#
# @file LibrariesAbsolutePath.cmake
#
# @project MORSE
# MORSE is a software package provided by:
# Inria Bordeaux - Sud-Ouest,
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
#
# @version 1.0.0
# @author Florent Pruvost
# @date 13-04-2018
#
###
# Transform relative path into absolute path for libraries
# lib_list (input/output): the name of the CMake variable containing libraries, e.g. BLAS_LIBRARIES
# hints_paths (input): additional paths to add when looking for libraries
macro(LIBRARIES_ABSOLUTE_PATH lib_list hints_paths)
# collect environment paths to dig
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
# copy the lib list
set (${lib_list}_COPY "${${lib_list}}")
# reset the lib list to populate
set(${lib_list} "")
foreach(_library ${${lib_list}_COPY})
if(EXISTS "${_library}")
# if already an absolute path, nothing special to do
list(APPEND ${lib_list} ${_library})
else()
# replace pattern -lfoo -> foo
string(REGEX REPLACE "^-l" "" _library "${_library}")
# remove extensions if exist
get_filename_component(_ext "${_library}" EXT)
set(_lib_extensions ".so" ".a" ".dyld" ".dll")
list(FIND _lib_extensions "${_ext}" _index)
if (${_index} GREATER -1)
get_filename_component(_library "${_library}" NAME_WE)
endif()
# try to find the lib
find_library(_library_path NAMES ${_library} HINTS ${hints_paths} ${_lib_env})
if (_library_path)
list(APPEND ${lib_list} ${_library_path})
else()
message(FATAL_ERROR "Dependency of ${lib_list} '${_library}' NOT FOUND")
endif()
unset(_library_path CACHE)
endif()
endforeach()
endmacro()
##
## @end file LibrariesAbsolutePath.cmake
##
###
#
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-2014 Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
#
# - Some macros to print status when search for headers and libs
# Main parameters of macros
# _libname: name of the lib you seek, foo for example
# _header_to_find: name of the header you seek, foo.h for example
# _lib_to_find: name of the library you seek, libfoo for example
# _pc_to_find: name of the pkg-config file zyou seek, foo.pc for example
#=============================================================================
# Copyright 2012-2013 Inria
# Copyright 2012-2013 Emmanuel Agullo
# Copyright 2012-2013 Mathieu Faverge
# Copyright 2012 Cedric Castagnede
# Copyright 2013 Florent Pruvost
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file MORSE-Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of Morse, substitute the full
# License text for the above reference.)
# Set some colors
#if(NOT WIN32)
# string(ASCII 27 Esc)
# set(ColourReset "${Esc}[m")
# set(ColourBold "${Esc}[1m")
# set(Red "${Esc}[31m")
# set(Green "${Esc}[32m")
# set(Yellow "${Esc}[33m")
# set(Blue "${Esc}[34m")
# set(Magenta "${Esc}[35m")
# set(Cyan "${Esc}[36m")
# set(White "${Esc}[37m")
# set(BoldRed "${Esc}[1;31m")
# set(BoldGreen "${Esc}[1;32m")
# set(BoldYellow "${Esc}[1;33m")
# set(BoldBlue "${Esc}[1;34m")
# set(BoldMagenta "${Esc}[1;35m")
# set(BoldCyan "${Esc}[1;36m")
# set(BoldWhite "${Esc}[1;37m")
#endif()
# This macro informs why the _header_to_find file has not been found
macro(Print_Find_Header_Status _libname _header_to_find)
# save _libname upper and lower case
string(TOUPPER ${_libname} LIBNAME)
string(TOLOWER ${_libname} libname)
# print status
#message(" ")
if(${LIBNAME}_INCDIR)
message("${Blue}${LIBNAME}_INCDIR is defined but ${_header_to_find}"
"has not been found in ${${LIBNAME}_INCDIR}${ColourReset}")
else()
if(${LIBNAME}_DIR)
message("${Blue}${LIBNAME}_DIR is defined but"
"${_header_to_find} has not been found in"
"${${LIBNAME}_DIR}/include${ColourReset}")
else()
message("${Blue}${_header_to_find} not found."
"Nor ${LIBNAME}_DIR neither ${LIBNAME}_INCDIR"
"are defined so that we looked for ${_header_to_find} in"
"system paths (INCLUDE, CPATH, C_INCLUDE_PATH,"
"INCLUDE_PATH, CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES)${ColourReset}")
if(_inc_env)
message("${Blue}${_header_to_find} has not been found in"
"${_inc_env}${ColourReset}")
endif()
endif()
endif()
message("${BoldBlue}Please indicate where to find ${_header_to_find}. You have three options:\n"
"- Option 1: Provide the root directory of the library with cmake option: -D${LIBNAME}_DIR=your/path/to/${libname}/\n"
"- Option 2: Provide the directory where to find the headers with cmake option: -D${LIBNAME}_INCDIR=your/path/to/${libname}/include/\n"
"- Option 3: Update your environment variable (INCLUDE or CPATH)\n"
"- Option 4: If your library provides a PkgConfig file, make sure pkg-config finds your library${ColourReset}")
#message(" ")
endmacro()
# This macro informs why the _lib_to_find file has not been found
macro(Print_Find_Library_Status _libname _lib_to_find)
# save _libname upper/lower case
string(TOUPPER ${_libname} LIBNAME)
string(TOLOWER ${_libname} libname)
# print status
#message(" ")
if(${LIBNAME}_LIBDIR)
message("${Yellow}${LIBNAME}_LIBDIR is defined but ${_lib_to_find}"
"has not been found in ${${LIBNAME}_LIBDIR}${ColourReset}")
else()
if(${LIBNAME}_DIR)
message("${Yellow}${LIBNAME}_DIR is defined but ${_lib_to_find}"
"has not been found in ${${LIBNAME}_DIR}/lib(or /lib32 or"
"/lib64)${ColourReset}")
else()
message("${Yellow}${_lib_to_find} not found."
"Nor ${LIBNAME}_DIR neither ${LIBNAME}_LIBDIR"
"are defined so that we looked for ${_lib_to_find} in"
"system paths (Linux: LD_LIBRARY_PATH, Windows: LIB,"
"Mac: DYLD_LIBRARY_PATH,"
"CMAKE_C_IMPLICIT_LINK_DIRECTORIES)${ColourReset}")
if(_lib_env)
message("${Yellow}${_lib_to_find} has not been found in"
"${_lib_env}${ColourReset}")
endif()
endif()
endif()
message("${BoldYellow}Please indicate where to find ${_lib_to_find}. You have three options:\n"
"- Option 1: Provide the root directory of the library with cmake option: -D${LIBNAME}_DIR=your/path/to/${libname}/\n"
"- Option 2: Provide the directory where to find the library with cmake option: -D${LIBNAME}_LIBDIR=your/path/to/${libname}/lib/\n"
"- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
"- Option 4: If your library provides a PkgConfig file, make sure pkg-config finds your library${ColourReset}")
endmacro()
# This macro informs why the _lib_to_find file has not been found
macro(Print_Find_Library_Blas_Status _libname _lib_to_find)
# save _libname upper/lower case
string(TOUPPER ${_libname} LIBNAME)
string(TOLOWER ${_libname} libname)
# print status
#message(" ")
if(${LIBNAME}_LIBDIR)
message("${Yellow}${LIBNAME}_LIBDIR is defined but ${_lib_to_find}"
"has not been found in ${ARGN}${ColourReset}")
else()
if(${LIBNAME}_DIR)
message("${Yellow}${LIBNAME}_DIR is defined but ${_lib_to_find}"
"has not been found in ${ARGN}${ColourReset}")
else()
message("${Yellow}${_lib_to_find} not found."
"Nor ${LIBNAME}_DIR neither ${LIBNAME}_LIBDIR"
"are defined so that we look for ${_lib_to_find} in"
"system paths (Linux: LD_LIBRARY_PATH, Windows: LIB,"
"Mac: DYLD_LIBRARY_PATH,"
"CMAKE_C_IMPLICIT_LINK_DIRECTORIES)${ColourReset}")
if(_lib_env)
message("${Yellow}${_lib_to_find} has not been found in"
"${_lib_env}${ColourReset}")
endif()
endif()
endif()
message("${BoldYellow}Please indicate where to find ${_lib_to_find}. You have three options:\n"
"- Option 1: Provide the root directory of the library with cmake option: -D${LIBNAME}_DIR=your/path/to/${libname}/\n"
"- Option 2: Provide the directory where to find the library with cmake option: -D${LIBNAME}_LIBDIR=your/path/to/${libname}/lib/\n"
"- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
"- Option 4: If your library provides a PkgConfig file, make sure pkg-config finds your library${ColourReset}")
endmacro()
# This macro informs why the _lib_to_find file has not been found
macro(Print_Find_Library_Blas_CheckFunc_Status _name)
# save _libname upper/lower case
string(TOUPPER ${_name} FUNCNAME)
string(TOLOWER ${_name} funcname)
# print status
#message(" ")
message("${Red}Libs have been found but check of symbol ${_name} failed "
"with following libraries ${ARGN}${ColourReset}")
message("${BoldRed}Please open your error file CMakeFiles/CMakeError.log"
"to figure out why it fails${ColourReset}")
#message(" ")
endmacro()
# This macro informs that _pc_to_find file has not been found in the list
# path you give as last argument (read in ${ARGN})
# ex: Print_Find_Pkgconfig_Status(foo foo.pc ${PATHLIST}
macro(Print_Find_Pkgconfig_Status _libname _pc_to_find)
# save _libname lower case
string(TOLOWER ${_libname} libname)
# print status
#message(" ")
message("${Magenta}${_pc_to_find} has not been found in"
"${ARGN}${ColourReset}")
message("${BoldMagenta}If you really want to use the pkg-config file of"
"${libname}, please update your PKG_CONFIG_PATH with the path"
"where ${_pc_to_find} states${ColourReset}")
#message(" ")
endmacro()
## 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"