Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 447f2a0e authored by Nicolas Bellot's avatar Nicolas Bellot Committed by hhakim
Browse files

header dans fichier *.cmake

parent 8a23b723
No related branches found
No related tags found
No related merge requests found
##############################################################################
## Description: ##
## ##
## Define 2 macro setting path : ##
## add_library_path set the path where the library file will be searched ##
## add_include_path set the path where the include directory will be ##
## searched ##
## ##
## For more information on the FAuST Project, please visit the website ##
## of the project : <http://faust.gforge.inria.fr> ##
## ##
## License: ##
## Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais, ##
## Luc Le Magoarou, Remi Gribonval ##
## INRIA Rennes, FRANCE ##
## http://www.inria.fr/ ##
## ##
## The FAuST Toolbox is distributed under the terms of the GNU Affero ##
## General Public License. ##
## This program is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU Affero General Public License as ##
## published by the Free Software Foundation. ##
## ##
## This program 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 Affero General Public License for more details. ##
## ##
## You should have received a copy of the GNU Affero General Public ##
## License along with this program. ##
## If not, see <http://www.gnu.org/licenses/>. ##
## ##
## Contacts: ##
## Nicolas Bellot : nicolas.bellot@inria.fr ##
## Adrien Leman : adrien.leman@inria.fr ##
## Thomas Gautrais : thomas.gautrais@inria.fr ##
## Luc Le Magoarou : luc.le-magoarou@inria.fr ##
## Remi Gribonval : remi.gribonval@inria.fr ##
##############################################################################
function(add_library_path LIB_TMP_PATH) function(add_library_path LIB_TMP_PATH)
if(${ARGC} LESS 2) if(${ARGC} LESS 2)
message(FATAL_ERROR "ARGC=${ARGC} : Wrong number of arguments in add_library_path macro") message(FATAL_ERROR "ARGC=${ARGC} : Wrong number of arguments in add_library_path macro")
......
##############################################################################
## Description: ##
## ##
## Define 2 macro finding libraries : ##
## check_external_libraries find the library file of the sepcified lib ##
## check_external_includes find the include directory of the specified lib##
## ##
## For more information on the FAuST Project, please visit the website ##
## of the project : <http://faust.gforge.inria.fr> ##
## ##
## License: ##
## Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais, ##
## Luc Le Magoarou, Remi Gribonval ##
## INRIA Rennes, FRANCE ##
## http://www.inria.fr/ ##
## ##
## The FAuST Toolbox is distributed under the terms of the GNU Affero ##
## General Public License. ##
## This program is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU Affero General Public License as ##
## published by the Free Software Foundation. ##
## ##
## This program 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 Affero General Public License for more details. ##
## ##
## You should have received a copy of the GNU Affero General Public ##
## License along with this program. ##
## If not, see <http://www.gnu.org/licenses/>. ##
## ##
## Contacts: ##
## Nicolas Bellot : nicolas.bellot@inria.fr ##
## Adrien Leman : adrien.leman@inria.fr ##
## Thomas Gautrais : thomas.gautrais@inria.fr ##
## Luc Le Magoarou : luc.le-magoarou@inria.fr ##
## Remi Gribonval : remi.gribonval@inria.fr ##
##############################################################################
macro(check_external_libraries LIBRARY_NAME LIBRARY_FILE IS_NECESSARY) macro(check_external_libraries LIBRARY_NAME LIBRARY_FILE IS_NECESSARY)
if(NOT ${ARGC} EQUAL 3) if(NOT ${ARGC} EQUAL 3)
message(FATAL_ERROR "Wrong number of arguments in check_external_libraries macro") message(FATAL_ERROR "Wrong number of arguments in check_external_libraries macro")
......
##############################################################################
## Description: ##
## ??? ##
## ##
## ##
## For more information on the FAuST Project, please visit the website ##
## of the project : <http://faust.gforge.inria.fr> ##
## ##
## License: ##
## Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais, ##
## Luc Le Magoarou, Remi Gribonval ##
## INRIA Rennes, FRANCE ##
## http://www.inria.fr/ ##
## ##
## The FAuST Toolbox is distributed under the terms of the GNU Affero ##
## General Public License. ##
## This program is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU Affero General Public License as ##
## published by the Free Software Foundation. ##
## ##
## This program 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 Affero General Public License for more details. ##
## ##
## You should have received a copy of the GNU Affero General Public ##
## License along with this program. ##
## If not, see <http://www.gnu.org/licenses/>. ##
## ##
## Contacts: ##
## Nicolas Bellot : nicolas.bellot@inria.fr ##
## Adrien Leman : adrien.leman@inria.fr ##
## Thomas Gautrais : thomas.gautrais@inria.fr ##
## Luc Le Magoarou : luc.le-magoarou@inria.fr ##
## Remi Gribonval : remi.gribonval@inria.fr ##
##############################################################################
##############################################################################
## Description: ##
## cmake script to check and find/install Eigen C++ library. ##
## (cf. http://eigen.tuxfamily.org/index.php?title=Main_Page) ##
## 1 output variable are assigned : ##
## - EIGEN_INC_DIR which is the path ##
## to the include directory of EIGEN ##
## No library file is required to use Eigen, only header file. ## ## ##
## For more information on the FAuST Project, please visit the website ##
## of the project : <http://faust.gforge.inria.fr> ##
## ##
## License: ##
## Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais, ##
## Luc Le Magoarou, Remi Gribonval ##
## INRIA Rennes, FRANCE ##
## http://www.inria.fr/ ##
## ##
## The FAuST Toolbox is distributed under the terms of the GNU Affero ##
## General Public License. ##
## This program is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU Affero General Public License as ##
## published by the Free Software Foundation. ##
## ##
## This program 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 Affero General Public License for more details. ##
## ##
## You should have received a copy of the GNU Affero General Public ##
## License along with this program. ##
## If not, see <http://www.gnu.org/licenses/>. ##
## ##
## Contacts: ##
## Nicolas Bellot : nicolas.bellot@inria.fr ##
## Adrien Leman : adrien.leman@inria.fr ##
## Thomas Gautrais : thomas.gautrais@inria.fr ##
## Luc Le Magoarou : luc.le-magoarou@inria.fr ##
## Remi Gribonval : remi.gribonval@inria.fr ##
##############################################################################
### find and/or install eigen lib (cf. http://eigen.tuxfamily.org/index.php?title=Main_Page) ### find and/or install eigen lib (cf. http://eigen.tuxfamily.org/index.php?title=Main_Page)
set(INCLUDE_PATH_LIST ${INCLUDE_PATH_LIST_TMP_DEFAULT}) # CACHE PATH "List of include paths used as PATH parameter in find_path") set(INCLUDE_PATH_LIST ${INCLUDE_PATH_LIST_TMP_DEFAULT}) # CACHE PATH "List of include paths used as PATH parameter in find_path")
check_external_includes("Eigen/Dense" EIGEN_INC_DIR 0) # on test avec INCLUDE_PATH_LIST_TMP_DEFAULT check_external_includes("Eigen/Dense" EIGEN_INC_DIR 0) # on test avec INCLUDE_PATH_LIST_TMP_DEFAULT
......
###### find external libraries ###### ##############################################################################
## Description: ##
## cmake script to check and find/install externals library/software ##
## such as : ##
## -Matlab ##
## -Eigen numerical C++ library for sparse and dense matrix calculus ##
## (cf. http://eigen.tuxfamily.org/index.php?title=Main_Page) ##
## -Openblas multihread C++ library for dense matrix calculus ##
## (cf http://www.openblas.net/) ##
## -MATIO C++ library for reading/writing MATLAB file format "mat" ##
## -LIBXML C++ library for reading/writing XML file ##
## -CUDA C++ library for numerical calculus on GPU (NVIDIA Cards) ##
## ##
## For more information on the FAuST Project, please visit the website ##
## of the project : <http://faust.gforge.inria.fr> ##
## ##
## License: ##
## Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais, ##
## Luc Le Magoarou, Remi Gribonval ##
## INRIA Rennes, FRANCE ##
## http://www.inria.fr/ ##
## ##
## The FAuST Toolbox is distributed under the terms of the GNU Affero ##
## General Public License. ##
## This program is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU Affero General Public License as ##
## published by the Free Software Foundation. ##
## ##
## This program 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 Affero General Public License for more details. ##
## ##
## You should have received a copy of the GNU Affero General Public ##
## License along with this program. ##
## If not, see <http://www.gnu.org/licenses/>. ##
## ##
## Contacts: ##
## Nicolas Bellot : nicolas.bellot@inria.fr ##
## Adrien Leman : adrien.leman@inria.fr ##
## Thomas Gautrais : thomas.gautrais@inria.fr ##
## Luc Le Magoarou : luc.le-magoarou@inria.fr ##
## Remi Gribonval : remi.gribonval@inria.fr ##
##############################################################################
if(WIN32) if(WIN32)
set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "lib" ) set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "lib" )
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} ".a") set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} ".a")
......
###### chek and find Openblas library ##############################################################################
## Description: ##
## cmake script to check and find MATIO C++ library. ##
## Library which allow to read and write ##
## files with extension ".mat" (used in Matlab) ##
## 2 output variable are assigned : ##
## - MATIO_INC_DIR which is the path ##
## to the include directory of MATIO ##
## -MATIO_LIB_FILE which is the path to library file of MATIO ##
## for instance path/libmatio.so for linux, ##
## path/libmatio.dylib for Mac, ##
## path/libmatio.dll for Windows ##
## ##
## For more information on the FAuST Project, please visit the website ##
## of the project : <http://faust.gforge.inria.fr> ##
## ##
## License: ##
## Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais, ##
## Luc Le Magoarou, Remi Gribonval ##
## INRIA Rennes, FRANCE ##
## http://www.inria.fr/ ##
## ##
## The FAuST Toolbox is distributed under the terms of the GNU Affero ##
## General Public License. ##
## This program is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU Affero General Public License as ##
## published by the Free Software Foundation. ##
## ##
## This program 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 Affero General Public License for more details. ##
## ##
## You should have received a copy of the GNU Affero General Public ##
## License along with this program. ##
## If not, see <http://www.gnu.org/licenses/>. ##
## ##
## Contacts: ##
## Nicolas Bellot : nicolas.bellot@inria.fr ##
## Adrien Leman : adrien.leman@inria.fr ##
## Thomas Gautrais : thomas.gautrais@inria.fr ##
## Luc Le Magoarou : luc.le-magoarou@inria.fr ##
## Remi Gribonval : remi.gribonval@inria.fr ##
##############################################################################
set(LIBRARY_PATH_LIST ${LIBRARY_PATH_LIST_TMP_DEFAULT}) # CACHE PATH "List of library paths used as PATH parameter in find_library") set(LIBRARY_PATH_LIST ${LIBRARY_PATH_LIST_TMP_DEFAULT}) # CACHE PATH "List of library paths used as PATH parameter in find_library")
set(INCLUDE_PATH_LIST ${INCLUDE_PATH_LIST_TMP_DEFAULT})# CACHE PATH "List of include paths used as PATH parameter in find_path") set(INCLUDE_PATH_LIST ${INCLUDE_PATH_LIST_TMP_DEFAULT})# CACHE PATH "List of include paths used as PATH parameter in find_path")
......
# - Try to find a version of Matlab and headers/library required by the ##############################################################################
# used compiler. It determines the right MEX-File extension and add ## Description: ##
# a macro to help the build of MEX-functions. ## cmake script to find Matlab path. It determines ##
## the right MEX-File extension and add a macro ##
## to help the build of MEX-functions. ##
## 2 output variable are assigned : ##
## -MATLAB_ROOT which is the path where your matlab is installed ##
## to the include directory of OPENBLAS ##
## -MEX_EXT which is the extension of mexfile depending on your OS ##
## and a 32 or 64 bits configuration ##
## for instance on Mac 64 bits MEX_EXT=maci64 ##
## ##
## ##
## For more information on the FAuST Project, please visit the website ##
## of the project : <http://faust.gforge.inria.fr> ##
## ##
## License: ##
## Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais, ##
## Luc Le Magoarou, Remi Gribonval ##
## INRIA Rennes, FRANCE ##
## http://www.inria.fr/ ##
## ##
## The FAuST Toolbox is distributed under the terms of the GNU Affero ##
## General Public License. ##
## This program is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU Affero General Public License as ##
## published by the Free Software Foundation. ##
## ##
## This program 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 Affero General Public License for more details. ##
## ##
## You should have received a copy of the GNU Affero General Public ##
## License along with this program. ##
## If not, see <http://www.gnu.org/licenses/>. ##
## ##
## Contacts: ##
## Nicolas Bellot : nicolas.bellot@inria.fr ##
## Adrien Leman : adrien.leman@inria.fr ##
## Thomas Gautrais : thomas.gautrais@inria.fr ##
## Luc Le Magoarou : luc.le-magoarou@inria.fr ##
## Remi Gribonval : remi.gribonval@inria.fr ##
##############################################################################
# #
# This module detects a Matlab's version between Matlab 7.0 # This module detects a Matlab's version between Matlab 7.0
# and Matlab 7.9 # and Matlab 7.9
......
###### chek and find Openblas library ##############################################################################
## Description: ##
## cmake script to check and find/install OPENBLAS C++ library. ##
## (cf http://www.openblas.net/) ##
## 2 output variable are assigned : ##
## - OPENBLAS_INC_DIR which is the path ##
## to the include directory of OPENBLAS ##
## -OPENBLAS_LIB_FILE which is the path to library file of OPENBLAS ##
## for instance path/libopenblas.so for linux, ##
## path/libopenblas.dylib for Mac, ##
## path/libopenblas.dll for Windows ##
## ##
## For more information on the FAuST Project, please visit the website ##
## of the project : <http://faust.gforge.inria.fr> ##
## ##
## License: ##
## Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais, ##
## Luc Le Magoarou, Remi Gribonval ##
## INRIA Rennes, FRANCE ##
## http://www.inria.fr/ ##
## ##
## The FAuST Toolbox is distributed under the terms of the GNU Affero ##
## General Public License. ##
## This program is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU Affero General Public License as ##
## published by the Free Software Foundation. ##
## ##
## This program 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 Affero General Public License for more details. ##
## ##
## You should have received a copy of the GNU Affero General Public ##
## License along with this program. ##
## If not, see <http://www.gnu.org/licenses/>. ##
## ##
## Contacts: ##
## Nicolas Bellot : nicolas.bellot@inria.fr ##
## Adrien Leman : adrien.leman@inria.fr ##
## Thomas Gautrais : thomas.gautrais@inria.fr ##
## Luc Le Magoarou : luc.le-magoarou@inria.fr ##
## Remi Gribonval : remi.gribonval@inria.fr ##
##############################################################################
set(LIBRARY_PATH_LIST ${LIBRARY_PATH_LIST_TMP_DEFAULT}) # CACHE PATH "List of library paths used as PATH parameter in find_library") set(LIBRARY_PATH_LIST ${LIBRARY_PATH_LIST_TMP_DEFAULT}) # CACHE PATH "List of library paths used as PATH parameter in find_library")
set(INCLUDE_PATH_LIST ${INCLUDE_PATH_LIST_TMP_DEFAULT})# CACHE PATH "List of include paths used as PATH parameter in find_path") set(INCLUDE_PATH_LIST ${INCLUDE_PATH_LIST_TMP_DEFAULT})# CACHE PATH "List of include paths used as PATH parameter in find_path")
......
###### chek and find Openblas library ##############################################################################
## Description: ##
## cmake script to check and find LIBXML2 C++ library. ##
## 2 output variable are assigned : ##
## - XML_INC_DIR which is the path ##
## to the include directory of LIBXML ##
## -XML2_LIB_FILE which is the path to library file of libxml2 ##
## for instance path/libxml2.so for linux, ##
## path/libxml2.dylib for Mac, ##
## path/libxml2.dll for Windows ##
## ##
## For more information on the FAuST Project, please visit the website ##
## of the project : <http://faust.gforge.inria.fr> ##
## ##
## License: ##
## Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais, ##
## Luc Le Magoarou, Remi Gribonval ##
## INRIA Rennes, FRANCE ##
## http://www.inria.fr/ ##
## ##
## The FAuST Toolbox is distributed under the terms of the GNU Affero ##
## General Public License. ##
## This program is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU Affero General Public License as ##
## published by the Free Software Foundation. ##
## ##
## This program 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 Affero General Public License for more details. ##
## ##
## You should have received a copy of the GNU Affero General Public ##
## License along with this program. ##
## If not, see <http://www.gnu.org/licenses/>. ##
## ##
## Contacts: ##
## Nicolas Bellot : nicolas.bellot@inria.fr ##
## Adrien Leman : adrien.leman@inria.fr ##
## Thomas Gautrais : thomas.gautrais@inria.fr ##
## Luc Le Magoarou : luc.le-magoarou@inria.fr ##
## Remi Gribonval : remi.gribonval@inria.fr ##
##############################################################################
set(LIBRARY_PATH_LIST ${LIBRARY_PATH_LIST_TMP_DEFAULT}) # CACHE PATH "List of library paths used as PATH parameter in find_library") set(LIBRARY_PATH_LIST ${LIBRARY_PATH_LIST_TMP_DEFAULT}) # CACHE PATH "List of library paths used as PATH parameter in find_library")
set(INCLUDE_PATH_LIST ${INCLUDE_PATH_LIST_TMP_DEFAULT})# CACHE PATH "List of include paths used as PATH parameter in find_path") set(INCLUDE_PATH_LIST ${INCLUDE_PATH_LIST_TMP_DEFAULT})# CACHE PATH "List of include paths used as PATH parameter in find_path")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment