Commit cd0d395d authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

add TMG as a component of LAPACKE to check whether lapacke provides the tmglib interface or not

parent 98bc23aa
......@@ -10,5 +10,5 @@ Find:
- cd modules/find/tests
- mkdir -p build
- cd build
- cmake .. -DENABLE_CTEST=ON -DQUARK_COMPONENTS="HWLOC" -DPASTIX_COMPONENTS="PARSEC;STARPU"
- cmake .. -DENABLE_CTEST=ON -DLAPACKE_COMPONENTS="TMG" -DQUARK_COMPONENTS="HWLOC" -DPASTIX_COMPONENTS="PARSEC;STARPU"
- ctest -V
......@@ -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-2016 Inria. All rights reserved.
# @copyright (c) 2012-2017 Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
......@@ -18,6 +18,11 @@
# LAPACKE depends on the following libraries:
# - LAPACK
#
# COMPONENTS are optional libraries CHAMELEON could be linked with,
# Use it to drive detection of a specific compilation chain
# COMPONENTS can be some of the following:
# - TMG: to check that LAPACKE provides the tmglib interface
#
# This module finds headers and lapacke library.
# Results are reported in variables:
# LAPACKE_FOUND - True if headers and requested libraries were found
......@@ -49,7 +54,7 @@
# Copyright 2012-2013 Emmanuel Agullo
# Copyright 2012-2013 Mathieu Faverge
# Copyright 2012 Cedric Castagnede
# Copyright 2013-2016 Florent Pruvost
# Copyright 2013-2017 Florent Pruvost
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file MORSE-Copyright.txt for details.
......@@ -68,6 +73,16 @@ if (NOT LAPACKE_FOUND)
endif()
endif()
# to check that LAPACKE provides the tmglib interface
set(LAPACKE_WITH_TMG OFF)
if( LAPACKE_FIND_COMPONENTS )
foreach( component ${LAPACKE_FIND_COMPONENTS} )
if (${component} STREQUAL "TMG")
set(LAPACKE_WITH_TMG ON)
endif()
endforeach()
endif()
# LAPACKE depends on LAPACK anyway, try to find it
if (NOT LAPACK_FOUND)
if(LAPACKE_FIND_REQUIRED)
......@@ -324,6 +339,10 @@ if (LAPACK_FOUND)
unset(LAPACKE_WORKS CACHE)
include(CheckFunctionExists)
check_function_exists(LAPACKE_dgeqrf LAPACKE_WORKS)
if (LAPACKE_WORKS AND LAPACKE_WITH_TMG)
unset(LAPACKE_WORKS CACHE)
check_function_exists(LAPACKE_dlatms_work LAPACKE_WORKS)
endif()
mark_as_advanced(LAPACKE_WORKS)
if(LAPACKE_WORKS)
......
......@@ -9,6 +9,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../")
set(PACKAGES "" CACHE STRING "List of packages to find, ex: BLAS;STARPU;PASTIX")
# specific components to look for with packages
set(LAPACKE_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with LAPACKE, ex: TMG")
set(QUARK_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with QUARK, ex: HWLOC")
set(PASTIX_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with PASTIX, ex: MPI;SEQ;STARPU;STARPU_CUDA;STARPU_FXT;SCOTCH;PTSCOTCH;METIS")
set(PETSC_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with PETSc, ex: CXX|C")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment