mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-01-18 17:31:19 +01:00
committed by
Rasmus Munk Larsen
parent
a73501cc76
commit
01a919d13f
@@ -34,6 +34,11 @@ if (POLICY CMP0177)
|
||||
cmake_policy(SET CMP0177 NEW)
|
||||
endif ()
|
||||
|
||||
# Respect <PackageName>_ROOT variables.
|
||||
if (POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif ()
|
||||
|
||||
#==============================================================================
|
||||
# CMake Project.
|
||||
#==============================================================================
|
||||
@@ -306,7 +311,6 @@ if (EIGEN_IS_BUILDING_)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR OFF)
|
||||
|
||||
find_package(StandardMathLibrary)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
find_package(AOCL QUIET)
|
||||
set(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO "")
|
||||
if(AOCL_FOUND)
|
||||
|
||||
@@ -86,9 +86,13 @@
|
||||
if(NOT DEFINED AOCL_ROOT)
|
||||
if(DEFINED ENV{AOCL_ROOT})
|
||||
set(AOCL_ROOT $ENV{AOCL_ROOT})
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
message(STATUS "AOCL_ROOT set from environment: ${AOCL_ROOT}")
|
||||
endif()
|
||||
else()
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
message(WARNING "AOCL_ROOT is not set. AOCL support will be disabled.")
|
||||
endif()
|
||||
set(AOCL_LIBRARIES "")
|
||||
endif()
|
||||
endif()
|
||||
@@ -115,11 +119,13 @@ endif()
|
||||
/opt/amd/aocl/lib64
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
if(AOCL_CORE_LIB)
|
||||
message(STATUS "Found AOCL core library: ${AOCL_CORE_LIB}")
|
||||
else()
|
||||
message(WARNING "AOCL core library not found in ${AOCL_ROOT}/lib or default locations.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Conditional BLIS library search based on MT requirement
|
||||
if(EIGEN_AOCL_BENCH_USE_MT)
|
||||
@@ -132,10 +138,14 @@ endif()
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
if(AOCL_BLAS_LIB)
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
message(STATUS "Found AOCL BLAS (MT) library: ${AOCL_BLAS_LIB}")
|
||||
endif()
|
||||
set(AOCL_BLAS_TYPE "multithreaded")
|
||||
else()
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
message(WARNING "AOCL multithreaded BLAS library not found, falling back to single-threaded.")
|
||||
endif()
|
||||
find_library(AOCL_BLAS_LIB
|
||||
NAMES blis
|
||||
PATHS
|
||||
@@ -155,12 +165,16 @@ endif()
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
if(AOCL_BLAS_LIB)
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
message(STATUS "Found AOCL BLAS (ST) library: ${AOCL_BLAS_LIB}")
|
||||
endif()
|
||||
set(AOCL_BLAS_TYPE "single-threaded")
|
||||
else()
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
message(WARNING "AOCL single-threaded BLAS library not found.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Now search for AOCL LAPACK library.
|
||||
find_library(AOCL_LAPACK_LIB
|
||||
@@ -170,11 +184,13 @@ endif()
|
||||
/opt/amd/aocl/lib64
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
if(AOCL_LAPACK_LIB)
|
||||
message(STATUS "Found AOCL LAPACK library: ${AOCL_LAPACK_LIB}")
|
||||
else()
|
||||
message(WARNING "AOCL LAPACK library not found in ${AOCL_ROOT}/lib or default locations.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else()
|
||||
# For 32-bit systems, similar search paths.
|
||||
@@ -185,11 +201,13 @@ endif()
|
||||
/opt/amd/aocl/lib32
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
if(AOCL_CORE_LIB)
|
||||
message(STATUS "Found AOCL core library: ${AOCL_CORE_LIB}")
|
||||
else()
|
||||
message(WARNING "AOCL core library not found in ${AOCL_ROOT}/lib or default locations.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Conditional BLIS library search for 32-bit
|
||||
if(EIGEN_AOCL_BENCH_USE_MT)
|
||||
@@ -201,10 +219,14 @@ endif()
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
if(AOCL_BLAS_LIB)
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
message(STATUS "Found AOCL BLAS (MT) library: ${AOCL_BLAS_LIB}")
|
||||
endif()
|
||||
set(AOCL_BLAS_TYPE "multithreaded")
|
||||
else()
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
message(WARNING "AOCL multithreaded BLAS library not found, falling back to single-threaded.")
|
||||
endif()
|
||||
find_library(AOCL_BLAS_LIB
|
||||
NAMES blis
|
||||
PATHS
|
||||
@@ -223,12 +245,16 @@ endif()
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
if(AOCL_BLAS_LIB)
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
message(STATUS "Found AOCL BLAS (ST) library: ${AOCL_BLAS_LIB}")
|
||||
endif()
|
||||
set(AOCL_BLAS_TYPE "single-threaded")
|
||||
else()
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
message(WARNING "AOCL single-threaded BLAS library not found.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(AOCL_LAPACK_LIB
|
||||
NAMES flame
|
||||
@@ -237,11 +263,13 @@ endif()
|
||||
/opt/amd/aocl/lib32
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
if (NOT AOCL_FIND_QUIETLY)
|
||||
if(AOCL_LAPACK_LIB)
|
||||
message(STATUS "Found AOCL LAPACK library: ${AOCL_LAPACK_LIB}")
|
||||
else()
|
||||
message(WARNING "AOCL LAPACK library not found in ${AOCL_ROOT}/lib or default locations.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Combine the found libraries into one variable.
|
||||
|
||||
Reference in New Issue
Block a user