Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
62060ff8
Commit
62060ff8
authored
Sep 01, 2016
by
PRUVOST Florent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: update morse find modules
parent
df1a9a74
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
202 additions
and
258 deletions
+202
-258
CMakeModules/morse/find/FindBLAS.cmake
CMakeModules/morse/find/FindBLAS.cmake
+3
-24
CMakeModules/morse/find/FindBLASEXT.cmake
CMakeModules/morse/find/FindBLASEXT.cmake
+8
-4
CMakeModules/morse/find/FindCBLAS.cmake
CMakeModules/morse/find/FindCBLAS.cmake
+4
-27
CMakeModules/morse/find/FindCHAMELEON.cmake
CMakeModules/morse/find/FindCHAMELEON.cmake
+6
-6
CMakeModules/morse/find/FindLAPACK.cmake
CMakeModules/morse/find/FindLAPACK.cmake
+3
-24
CMakeModules/morse/find/FindLAPACKE.cmake
CMakeModules/morse/find/FindLAPACKE.cmake
+4
-26
CMakeModules/morse/find/FindLAPACKEXT.cmake
CMakeModules/morse/find/FindLAPACKEXT.cmake
+4
-0
CMakeModules/morse/find/FindMAGMA.cmake
CMakeModules/morse/find/FindMAGMA.cmake
+4
-4
CMakeModules/morse/find/FindMUMPS.cmake
CMakeModules/morse/find/FindMUMPS.cmake
+120
-108
CMakeModules/morse/find/FindPTSCOTCH.cmake
CMakeModules/morse/find/FindPTSCOTCH.cmake
+20
-3
CMakeModules/morse/find/FindSCALAPACK.cmake
CMakeModules/morse/find/FindSCALAPACK.cmake
+5
-26
CMakeModules/morse/find/FindSCOTCH.cmake
CMakeModules/morse/find/FindSCOTCH.cmake
+15
-0
CMakeModules/morse/find/FindSTARPU.cmake
CMakeModules/morse/find/FindSTARPU.cmake
+2
-2
CMakeModules/morse/find/FindTMG.cmake
CMakeModules/morse/find/FindTMG.cmake
+4
-4
No files found.
CMakeModules/morse/find/FindBLAS.cmake
View file @
62060ff8
...
...
@@ -3,7 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-201
4
Inria. All rights reserved.
# @copyright (c) 2012-201
6
Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
...
...
@@ -40,6 +40,7 @@
# are not given as cmake variable: BLAS_DIR, BLAS_INCDIR, BLAS_LIBDIR
# For MKL case and if no paths are given as hints, we will try to use the MKLROOT
# environment variable
# BLAS_VERBOSE Print some additional information during BLAS libraries detection
##########
### List of vendors (BLA_VENDOR) valid in this module
########## List of vendors (BLA_VENDOR) valid in this module
...
...
@@ -77,28 +78,6 @@
# (To distribute this file outside of CMake, 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()
## Some macros to print status when search for headers and libs
# This macro informs why the _lib_to_find file has not been found
macro
(
Print_Find_Library_Blas_Status _libname _lib_to_find
)
...
...
@@ -1252,7 +1231,7 @@ endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
# Generic BLAS library?
if
(
BLA_VENDOR STREQUAL
"Generic"
OR BLA_VENDOR STREQUAL
"All"
)
set
(
BLAS_SEARCH_LIBS
"blas;blas_LINUX;blas_MAC;blas_WINDOWS"
)
set
(
BLAS_SEARCH_LIBS
"blas;blas_LINUX;blas_MAC;blas_WINDOWS
;refblas
"
)
foreach
(
SEARCH_LIB
${
BLAS_SEARCH_LIBS
}
)
if
(
BLAS_LIBRARIES
)
else
()
...
...
CMakeModules/morse/find/FindBLASEXT.cmake
View file @
62060ff8
...
...
@@ -3,7 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-201
4
Inria. All rights reserved.
# @copyright (c) 2012-201
6
Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
...
...
@@ -13,8 +13,8 @@
# This module allows to find BLAS libraries by calling the official FindBLAS module
# and handles the creation of different library lists whether the user wishes to link
# with a sequential BLAS or a multihreaded (BLAS_SEQ_LIBRARIES and BLAS_PAR_LIBRARIES).
# BLAS is detected with a FindBLAS call then if the BLAS vendor is Intel10_64lp
or
ACML
#
then the module trie
s to find the corresponding multithreaded libraries.
# BLAS is detected with a FindBLAS call then if the BLAS vendor is Intel10_64lp
,
ACML
#
or IBMESSLMT then the module attempt
s to find the corresponding multithreaded libraries.
#
# The following variables have been added to manage links with sequential or multithreaded
# versions:
...
...
@@ -28,7 +28,7 @@
# Copyright 2012-2013 Emmanuel Agullo
# Copyright 2012-2013 Mathieu Faverge
# Copyright 2012 Cedric Castagnede
# Copyright 2013
Florent Pruvost
# Copyright 2013
-2016
Florent Pruvost
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file MORSE-Copyright.txt for details.
...
...
@@ -132,6 +132,10 @@ if(BLA_VENDOR MATCHES "Intel*")
endif
()
list
(
APPEND _inc_env
"
${
CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES
}
"
)
list
(
APPEND _inc_env
"
${
CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
}
"
)
set
(
ENV_MKLROOT
"$ENV{MKLROOT}"
)
if
(
ENV_MKLROOT
)
list
(
APPEND _inc_env
"
${
ENV_MKLROOT
}
/include"
)
endif
()
list
(
REMOVE_DUPLICATES _inc_env
)
# find mkl.h inside known include paths
...
...
CMakeModules/morse/find/FindCBLAS.cmake
View file @
62060ff8
...
...
@@ -3,7 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-201
4
Inria. All rights reserved.
# @copyright (c) 2012-201
6
Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
...
...
@@ -18,11 +18,6 @@
# CBLAS depends on the following libraries:
# - BLAS
#
# COMPONENTS are optional libraries LAPACKE could be linked with,
# Use it to drive detection of a specific compilation chain
# COMPONENTS can be some of the following:
# - BLASEXT: to activate detection of BLAS with BLASEXT cmake module
#
# This module finds headers and cblas library.
# Results are reported in variables:
# CBLAS_FOUND - True if headers and requested libraries were found
...
...
@@ -67,7 +62,7 @@
# Copyright 2012-2013 Emmanuel Agullo
# Copyright 2012-2013 Mathieu Faverge
# Copyright 2012 Cedric Castagnede
# Copyright 2013
Florent Pruvost
# Copyright 2013
-2016
Florent Pruvost
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file MORSE-Copyright.txt for details.
...
...
@@ -88,30 +83,12 @@ if (NOT CBLAS_FOUND)
endif
()
# CBLAS may depend on BLASEXT
# try to find it specified as COMPONENTS during the call
if
(
CBLAS_FIND_COMPONENTS
)
foreach
(
component
${
CBLAS_FIND_COMPONENTS
}
)
if
(
CBLAS_FIND_REQUIRED_
${
component
}
)
find_package
(
${
component
}
REQUIRED
)
else
()
find_package
(
${
component
}
)
endif
()
if
(
${
component
}
_FOUND
)
set
(
CBLAS_
${
component
}
_FOUND TRUE
)
else
()
set
(
CBLAS_
${
component
}
_FOUND FALSE
)
endif
()
endforeach
()
endif
()
# CBLAS depends on BLAS anyway, try to find it
if
(
NOT BLAS_FOUND
)
if
(
CBLAS_FIND_REQUIRED
)
find_package
(
BLAS REQUIRED
)
find_package
(
BLAS
EXT
REQUIRED
)
else
()
find_package
(
BLAS
)
find_package
(
BLAS
EXT
)
endif
()
endif
()
...
...
CMakeModules/morse/find/FindCHAMELEON.cmake
View file @
62060ff8
...
...
@@ -3,7 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-201
4
Inria. All rights reserved.
# @copyright (c) 2012-201
6
Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
...
...
@@ -56,7 +56,7 @@
# Copyright 2012-2013 Emmanuel Agullo
# Copyright 2012-2013 Mathieu Faverge
# Copyright 2012 Cedric Castagnede
# Copyright 2013
Florent Pruvost
# Copyright 2013
-2016
Florent Pruvost
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file MORSE-Copyright.txt for details.
...
...
@@ -245,9 +245,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN
message
(
STATUS
"Looking for CHAMELEON - Try to detect CBLAS (depends on BLAS)"
)
endif
()
if
(
CHAMELEON_FIND_REQUIRED
)
find_package
(
CBLAS REQUIRED
COMPONENTS BLASEXT
)
find_package
(
CBLAS REQUIRED
)
else
()
find_package
(
CBLAS
COMPONENTS BLASEXT
)
find_package
(
CBLAS
)
endif
()
# CHAMELEON depends on LAPACKE
...
...
@@ -261,9 +261,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN
message
(
STATUS
"Looking for CHAMELEON - Try to detect LAPACKE (depends on LAPACK)"
)
endif
()
if
(
CHAMELEON_FIND_REQUIRED
)
find_package
(
LAPACKE REQUIRED
COMPONENTS LAPACKEXT
)
find_package
(
LAPACKE REQUIRED
)
else
()
find_package
(
LAPACKE
COMPONENTS LAPACKEXT
)
find_package
(
LAPACKE
)
endif
()
# CHAMELEON depends on TMG
...
...
CMakeModules/morse/find/FindLAPACK.cmake
View file @
62060ff8
...
...
@@ -3,7 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-201
4
Inria. All rights reserved.
# @copyright (c) 2012-201
6
Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
...
...
@@ -57,27 +57,6 @@
# 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()
## Some macros to print status when search for headers and libs
# This macro informs why the _lib_to_find file has not been found
macro
(
Print_Find_Library_Blas_Status _libname _lib_to_find
)
...
...
@@ -319,9 +298,9 @@ set(LAPACK95_LIBRARIES)
if
(
NOT BLAS_FOUND
)
if
(
LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED
)
find_package
(
BLAS
)
find_package
(
BLASEXT
)
else
(
LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED
)
find_package
(
BLAS
REQUIRED
)
find_package
(
BLASEXT
REQUIRED
)
endif
(
LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED
)
endif
()
...
...
CMakeModules/morse/find/FindLAPACKE.cmake
View file @
62060ff8
...
...
@@ -3,7 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-201
4
Inria. All rights reserved.
# @copyright (c) 2012-201
6
Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
...
...
@@ -18,11 +18,6 @@
# LAPACKE depends on the following libraries:
# - LAPACK
#
# COMPONENTS are optional libraries LAPACKE could be linked with,
# Use it to drive detection of a specific compilation chain
# COMPONENTS available:
# - LAPACKEXT: to activate detection of LAPACK with LAPACKEXT cmake module
#
# This module finds headers and lapacke library.
# Results are reported in variables:
# LAPACKE_FOUND - True if headers and requested libraries were found
...
...
@@ -54,7 +49,7 @@
# Copyright 2012-2013 Emmanuel Agullo
# Copyright 2012-2013 Mathieu Faverge
# Copyright 2012 Cedric Castagnede
# Copyright 2013
Florent Pruvost
# Copyright 2013
-2016
Florent Pruvost
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file MORSE-Copyright.txt for details.
...
...
@@ -73,29 +68,12 @@ if (NOT LAPACKE_FOUND)
endif
()
endif
()
# LAPACKE depends on LAPACKEXT
# try to find it specified as COMPONENTS during the call
if
(
LAPACKE_FIND_COMPONENTS
)
foreach
(
component
${
LAPACKE_FIND_COMPONENTS
}
)
if
(
LAPACKE_FIND_REQUIRED_
${
component
}
)
find_package
(
${
component
}
REQUIRED
)
else
()
find_package
(
${
component
}
)
endif
()
if
(
${
component
}
_FOUND
)
set
(
LAPACKE_
${
component
}
_FOUND TRUE
)
else
()
set
(
LAPACKE_
${
component
}
_FOUND FALSE
)
endif
()
endforeach
()
endif
()
# LAPACKE depends on LAPACK anyway, try to find it
if
(
NOT LAPACK_FOUND
)
if
(
LAPACKE_FIND_REQUIRED
)
find_package
(
LAPACK REQUIRED
)
find_package
(
LAPACK
EXT
REQUIRED
)
else
()
find_package
(
LAPACK
)
find_package
(
LAPACK
EXT
)
endif
()
endif
()
...
...
CMakeModules/morse/find/FindLAPACKEXT.cmake
View file @
62060ff8
...
...
@@ -76,6 +76,10 @@ if(BLA_VENDOR MATCHES "Intel*")
endif
()
list
(
APPEND _inc_env
"
${
CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES
}
"
)
list
(
APPEND _inc_env
"
${
CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
}
"
)
set
(
ENV_MKLROOT
"$ENV{MKLROOT}"
)
if
(
ENV_MKLROOT
)
list
(
APPEND _inc_env
"
${
ENV_MKLROOT
}
/include"
)
endif
()
list
(
REMOVE_DUPLICATES _inc_env
)
if
(
BLAS_DIR
)
...
...
CMakeModules/morse/find/FindMAGMA.cmake
View file @
62060ff8
...
...
@@ -3,7 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-201
4
Inria. All rights reserved.
# @copyright (c) 2012-201
6
Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
...
...
@@ -48,7 +48,7 @@
# Copyright 2012-2013 Emmanuel Agullo
# Copyright 2012-2013 Mathieu Faverge
# Copyright 2012 Cedric Castagnede
# Copyright 2013
Florent Pruvost
# Copyright 2013
-2016
Florent Pruvost
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file MORSE-Copyright.txt for details.
...
...
@@ -86,9 +86,9 @@ endif()
# MAGMA depends on LAPACK anyway, try to find it
if
(
NOT LAPACK_FOUND
)
if
(
MAGMA_FIND_REQUIRED
)
find_package
(
LAPACK REQUIRED
)
find_package
(
LAPACK
EXT
REQUIRED
)
else
()
find_package
(
LAPACK
)
find_package
(
LAPACK
EXT
)
endif
()
endif
()
# MAGMA depends on CBLAS anyway, try to find it
...
...
CMakeModules/morse/find/FindMUMPS.cmake
View file @
62060ff8
...
...
@@ -112,33 +112,6 @@ if (NOT MUMPS_FIND_QUIETLY)
message
(
STATUS
"Looking for MUMPS - PkgConfig not used"
)
endif
()
# Dependencies detection
# ----------------------
# Add system library paths to search lib
# --------------------------------------
unset
(
_lib_env
)
set
(
ENV_MUMPS_LIBDIR
"$ENV{MUMPS_LIBDIR}"
)
if
(
ENV_MUMPS_LIBDIR
)
list
(
APPEND _lib_env
"
${
ENV_MUMPS_LIBDIR
}
"
)
elseif
(
ENV_MUMPS_DIR
)
list
(
APPEND _lib_env
"
${
ENV_MUMPS_DIR
}
"
)
list
(
APPEND _lib_env
"
${
ENV_MUMPS_DIR
}
/lib"
)
else
()
if
(
WIN32
)
string
(
REPLACE
":"
";"
_lib_env
"$ENV{LIB}"
)
else
()
if
(
APPLE
)
string
(
REPLACE
":"
";"
_lib_env
"$ENV{DYLD_LIBRARY_PATH}"
)
else
()
string
(
REPLACE
":"
";"
_lib_env
"$ENV{LD_LIBRARY_PATH}"
)
endif
()
list
(
APPEND _lib_env
"
${
CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
}
"
)
list
(
APPEND _lib_env
"
${
CMAKE_C_IMPLICIT_LINK_DIRECTORIES
}
"
)
endif
()
endif
()
list
(
REMOVE_DUPLICATES _lib_env
)
# Required dependencies
# ---------------------
...
...
@@ -212,14 +185,14 @@ endif (NOT SCALAPACK_FOUND AND MUMPS_LOOK_FOR_MPI)
# MUMPS may depends on SCOTCH
#----------------------------
if
(
NOT SCOTCH_FOUND AND
MUMPS_LOOK_FOR_SCOTCH
)
if
(
MUMPS_LOOK_FOR_SCOTCH
)
if
(
NOT MUMPS_FIND_QUIETLY
)
message
(
STATUS
"Looking for MUMPS - Try to detect SCOTCH"
)
message
(
STATUS
"Looking for MUMPS - Try to detect SCOTCH
with esmumps
"
)
endif
()
if
(
MUMPS_FIND_REQUIRED AND MUMPS_FIND_REQUIRED_SCOTCH
)
find_package
(
SCOTCH REQUIRED
)
find_package
(
SCOTCH REQUIRED
COMPONENTS ESMUMPS
)
else
()
find_package
(
SCOTCH
)
find_package
(
SCOTCH
COMPONENTS ESMUMPS
)
endif
()
endif
()
...
...
@@ -240,44 +213,92 @@ endif()
# Looking for MUMPS
# -----------------
# Add system include paths to search include
# ------------------------------------------
unset
(
_inc_env
)
set
(
ENV_MUMPS_DIR
"$ENV{MUMPS_DIR}"
)
set
(
ENV_MUMPS_INCDIR
"$ENV{MUMPS_INCDIR}"
)
if
(
ENV_MUMPS_INCDIR
)
list
(
APPEND _inc_env
"
${
ENV_MUMPS_INCDIR
}
"
)
elseif
(
ENV_MUMPS_DIR
)
list
(
APPEND _inc_env
"
${
ENV_MUMPS_DIR
}
"
)
list
(
APPEND _inc_env
"
${
ENV_MUMPS_DIR
}
/include"
)
list
(
APPEND _inc_env
"
${
ENV_MUMPS_DIR
}
/include/mumps"
)
else
()
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
()
endif
()
list
(
APPEND _inc_env
"
${
CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES
}
"
)
list
(
APPEND _inc_env
"
${
CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
}
"
)
list
(
REMOVE_DUPLICATES _inc_env
)
# Add system library paths to search lib
# --------------------------------------
unset
(
_lib_env
)
set
(
ENV_MUMPS_LIBDIR
"$ENV{MUMPS_LIBDIR}"
)
if
(
ENV_MUMPS_LIBDIR
)
list
(
APPEND _lib_env
"
${
ENV_MUMPS_LIBDIR
}
"
)
elseif
(
ENV_MUMPS_DIR
)
list
(
APPEND _lib_env
"
${
ENV_MUMPS_DIR
}
"
)
list
(
APPEND _lib_env
"
${
ENV_MUMPS_DIR
}
/lib"
)
else
()
if
(
WIN32
)
string
(
REPLACE
":"
";"
_lib_env
"$ENV{LIB}"
)
else
()
if
(
APPLE
)
string
(
REPLACE
":"
";"
_lib_env
"$ENV{DYLD_LIBRARY_PATH}"
)
else
()
string
(
REPLACE
":"
";"
_lib_env
"$ENV{LD_LIBRARY_PATH}"
)
endif
()
list
(
APPEND _lib_env
"
${
CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
}
"
)
list
(
APPEND _lib_env
"
${
CMAKE_C_IMPLICIT_LINK_DIRECTORIES
}
"
)
endif
()
endif
()
list
(
REMOVE_DUPLICATES _lib_env
)
# Looking for include
# -------------------
# Try to find the mumps header in the given path
# ----------------------------------------------
# create list of headers to find
list
(
APPEND MUMPS_hdrs_to_find
"smumps_c.h;dmumps_c.h;cmumps_c.h;zmumps_c.h"
)
# call cmake macro to find the header path
if
(
MUMPS_DIR
)
set
(
MUMPS_smumps_c.h_DIRS
"MUMPS_smumps_c.h_DIRS-NOTFOUND"
)
find_path
(
MUMPS_smumps_c.h_DIRS
NAMES smumps_c.h
HINTS
"
${
MUMPS_DIR
}
"
"$ENV{MUMPS_DIR}"
PATH_SUFFIXES
"include"
)
set
(
MUMPS_dmumps_c.h_DIRS
"MUMPS_dmumps_c.h_DIRS-NOTFOUND"
)
find_path
(
MUMPS_dmumps_c.h_DIRS
NAMES dmumps_c.h
HINTS
"
${
MUMPS_DIR
}
"
"$ENV{MUMPS_DIR}"
PATH_SUFFIXES
"include"
)
set
(
MUMPS_cmumps_c.h_DIRS
"MUMPS_cmumps_c.h_DIRS-NOTFOUND"
)
find_path
(
MUMPS_cmumps_c.h_DIRS
NAMES cmumps_c.h
HINTS
"
${
MUMPS_DIR
}
"
"$ENV{MUMPS_DIR}"
PATH_SUFFIXES
"include"
)
set
(
MUMPS_zmumps_c.h_DIRS
"MUMPS_zmumps_c.h_DIRS-NOTFOUND"
)
find_path
(
MUMPS_zmumps_c.h_DIRS
NAMES zmumps_c.h
HINTS
"
${
MUMPS_DIR
}
"
"$ENV{MUMPS_DIR}"
PATH_SUFFIXES
"include"
)
if
(
MUMPS_INCDIR
)
foreach
(
mumps_hdr
${
MUMPS_hdrs_to_find
}
)
set
(
MUMPS_
${
mumps_hdr
}
_DIRS
"MUMPS_
${
mumps_hdr
}
_INCLUDE_DIRS-NOTFOUND"
)
find_path
(
MUMPS_
${
mumps_hdr
}
_DIRS
NAMES
${
mumps_hdr
}
HINTS
${
MUMPS_INCDIR
}
)
endforeach
()
else
()
if
(
MUMPS_FIND_REQUIRED
)
message
(
FATAL_ERROR
"Looking for mumps -- MUMPS_DIR is not set, to find"
" MUMPS please set MUMPS_DIR, the path to MUMPS installation where"
" sub-directories include/ and lib/ are located"
)
if
(
MUMPS_DIR
)
set
(
MUMPS_
${
mumps_hdr
}
_DIRS
"MUMPS_
${
mumps_hdr
}
_INCLUDE_DIRS-NOTFOUND"
)
foreach
(
mumps_hdr
${
MUMPS_hdrs_to_find
}
)
find_path
(
MUMPS_
${
mumps_hdr
}
_DIRS
NAMES
${
mumps_hdr
}
HINTS
${
MUMPS_DIR
}
PATH_SUFFIXES
"include"
)
endforeach
()
else
()
if
(
NOT MUMPS_FIND_QUIETLY
)
message
(
STATUS
"Looking for mumps -- MUMPS_DIR is not set, to find"
" MUMPS please set MUMPS_DIR, the path to MUMPS installation where"
" sub-directories include/ and lib/ are located"
)
endif
()
foreach
(
mumps_hdr
${
MUMPS_hdrs_to_find
}
)
set
(
MUMPS_
${
mumps_hdr
}
_DIRS
"MUMPS_
${
mumps_hdr
}
_INCLUDE_DIRS-NOTFOUND"
)
find_path
(
MUMPS_
${
mumps_hdr
}
_DIRS
NAMES
${
mumps_hdr
}
HINTS
${
_inc_env
}
)
endforeach
()
endif
()
endif
()
...
...
@@ -329,57 +350,48 @@ endif()
# Looking for lib
# ---------------
# Try to find the mumps lib in the given paths
# --------------------------------------------
# create list of libs to find
set
(
MUMPS_libs_to_find
"mumps_common;pord"
)
if
(
MUMPS_LOOK_FOR_SEQ
)
list
(
APPEND MUMPS_libs_to_find
"mpiseq"
)
endif
()
if
(
MUMPS_PREC_S
)
list
(
APPEND MUMPS_libs_to_find
"smumps"
)
endif
()
if
(
MUMPS_PREC_D
)
list
(
APPEND MUMPS_libs_to_find
"dmumps"
)
endif
()
if
(
MUMPS_PREC_C
)
list
(
APPEND MUMPS_libs_to_find
"cmumps"
)
endif
()
if
(
MUMPS_PREC_Z
)
list
(
APPEND MUMPS_libs_to_find
"zmumps"
)
endif
()
# call cmake macro to find the lib path
if
(
MUMPS_DIR
)
set
(
MUMPS_smumps_LIBRARY
"MUMPS_smumps_LIBRARY-NOTFOUND"
)
find_library
(
MUMPS_smumps_LIBRARY
NAMES smumps
HINTS
"
${
MUMPS_DIR
}
"
"$ENV{MUMPS_DIR}"
PATH_SUFFIXES lib
)
set
(
MUMPS_dmumps_LIBRARY
"MUMPS_dmumps_LIBRARY-NOTFOUND"
)
find_library
(
MUMPS_dmumps_LIBRARY
NAMES dmumps
HINTS
"
${
MUMPS_DIR
}
"
"$ENV{MUMPS_DIR}"
PATH_SUFFIXES lib
)
set
(
MUMPS_cmumps_LIBRARY
"MUMPS_cmumps_LIBRARY-NOTFOUND"
)
find_library
(
MUMPS_cmumps_LIBRARY
NAMES cmumps
HINTS
"
${
MUMPS_DIR
}
"
"$ENV{MUMPS_DIR}"
PATH_SUFFIXES lib
)
set
(
MUMPS_zmumps_LIBRARY
"MUMPS_zmumps_LIBRARY-NOTFOUND"
)
find_library
(
MUMPS_zmumps_LIBRARY
NAMES zmumps
HINTS
"
${
MUMPS_DIR
}
"
"$ENV{MUMPS_DIR}"
PATH_SUFFIXES lib
)
set
(
MUMPS_mumps_common_LIBRARY
"MUMPS_mumps_common_LIBRARY-NOTFOUND"
)
find_library
(
MUMPS_mumps_common_LIBRARY
NAMES mumps_common
HINTS
"
${
MUMPS_DIR
}
"
"$ENV{MUMPS_DIR}"
PATH_SUFFIXES lib
)
set
(
MUMPS_mpiseq_LIBRARY
"MUMPS_mpiseq_LIBRARY-NOTFOUND"
)
find_library
(
MUMPS_mpiseq_LIBRARY
NAMES mpiseq
HINTS
"
${
MUMPS_DIR
}
"
"$ENV{MUMPS_DIR}"
PATH_SUFFIXES libseq
)
set
(
MUMPS_pord_LIBRARY
"MUMPS_pord_LIBRARY-NOTFOUND"
)
find_library
(
MUMPS_pord_LIBRARY
NAMES pord
HINTS
"
${
MUMPS_DIR
}
"
"$ENV{MUMPS_DIR}"
PATH_SUFFIXES lib
)
if
(
MUMPS_LIBDIR
)
foreach
(
mumps_lib
${
MUMPS_libs_to_find
}
)
set
(
MUMPS_
${
mumps_lib
}
_LIBRARY
"MUMPS_
${
mumps_lib
}
_LIBRARY-NOTFOUND"
)
find_library
(
MUMPS_
${
mumps_lib
}
_LIBRARY
NAMES
${
mumps_lib
}
HINTS
${
MUMPS_LIBDIR
}
)
endforeach
()
else
()
if
(
MUMPS_FIND_REQUIRED
)
message
(
FATAL_ERROR
"Looking for mumps -- MUMPS_DIR is not set, to find"
" MUMPS please set MUMPS_DIR, the path to MUMPS installation where"
" sub-directories include/ and lib/ are located"
)
if
(
MUMPS_DIR
)
foreach
(
mumps_lib
${
MUMPS_libs_to_find
}
)
set
(
MUMPS_
${
mumps_lib
}
_LIBRARY
"MUMPS_
${
mumps_lib
}
_LIBRARY-NOTFOUND"
)
find_library
(
MUMPS_
${
mumps_lib
}
_LIBRARY
NAMES
${
mumps_lib
}
HINTS
${
MUMPS_DIR
}
PATH_SUFFIXES lib lib32 lib64
)
endforeach
()
else
()
if
(
NOT MUMPS_FIND_QUIETLY
)
message
(
STATUS
"Looking for mumps -- MUMPS_DIR is not set, to find"
" MUMPS please set MUMPS_DIR, the path to MUMPS installation where"
" sub-directories include/ and lib/ are located"
)
endif
()
foreach
(
mumps_lib
${
MUMPS_libs_to_find
}
)
set
(
MUMPS_
${
mumps_lib
}
_LIBRARY
"MUMPS_
${
mumps_lib
}
_LIBRARY-NOTFOUND"
)
find_library
(
MUMPS_
${
mumps_lib
}
_LIBRARY
NAMES
${
mumps_lib
}
HINTS
${
_lib_env
}
)
endforeach
()
endif
()
endif
()
...
...
CMakeModules/morse/find/FindPTSCOTCH.cmake
View file @
62060ff8
...
...
@@ -62,7 +62,19 @@ if (NOT PTSCOTCH_FOUND)
endif
()
endif
()
# PTSCOTCH may depend on Threads, try to find it
# Set the version to find
set
(
PTSCOTCH_LOOK_FOR_ESMUMPS OFF
)
if
(
PTSCOTCH_FIND_COMPONENTS
)
foreach
(
component
${
PTSCOTCH_FIND_COMPONENTS
}
)
if
(
${
component
}
STREQUAL
"ESMUMPS"
)
# means we look for esmumps library
set
(
PTSCOTCH_LOOK_FOR_ESMUMPS ON
)
endif
()
endforeach
()
endif
()
# PTSCOTCH depends on Threads, try to find it
if
(
NOT THREADS_FOUND
)
if
(
PTSCOTCH_FIND_REQUIRED
)
find_package
(
Threads REQUIRED
)
...
...
@@ -71,7 +83,7 @@ if (NOT THREADS_FOUND)
endif
()
endif
()
# PTSCOTCH
may depend
on MPI, try to find it
# PTSCOTCH
depends
on MPI, try to find it
if
(
NOT MPI_FOUND
)