Commit 88e3e28f authored by GILLES Sebastien's avatar GILLES Sebastien

#1217 Blas library may now be either custom linker or a standard library.

parent b8c3cd23
......@@ -128,6 +128,13 @@ morefem_find_library(LIB_LUA "lua" ${LUA_LIB_DIR} "Lua")
morefem_find_library(LIB_BOOST_FILESYSTEM "boost_filesystem" ${BOOST_LIB_DIR} "Boost filesystem")
morefem_find_library(LIB_BOOST_SYSTEM "boost_system" ${BOOST_LIB_DIR} "Boost system")
if(BLAS_CUSTOM_LINKER)
set(LIB_BLAS ${BLAS_LIB})
else()
morefem_find_library(LIB_BLAS ${BLAS_LIB} ${BLAS_LIB_DIR} "Blas library.")
endif()
set(MOREFEM_COMMON_DEP
${LIB_OPEN_MPI}
${LIB_OPEN_MPI_CXX}
......@@ -136,7 +143,7 @@ set(MOREFEM_COMMON_DEP
${LIB_LUA}
${LIB_BOOST_FILESYSTEM}
${LIB_BOOST_SYSTEM}
"-framework Accelerate"
${LIB_BLAS}
)
......
# Choose C and C++ compilers. You might also specifies here clang static analyzer (paths to ccc-analyzer and c++-analyzer respectively) to perform static analysis of the code.
set(MPI_CC /Users/Shared/LibraryVersions/llvm-clang/Openmpi/bin/mpicc )
set(MPI_CXX /Users/Shared/LibraryVersions/llvm-clang/Openmpi/bin/mpic++ )
# Attention: those will be used only if user does not supersede them by prioviding -DCMAKE_C_COMPILER or -DCMAKE_CXX_COMPILER on command line!
set(MPI_CC /Users/Shared/LibraryVersions/clang/Openmpi/bin/mpicc )
set(MPI_CXX /Users/Shared/LibraryVersions/clang/Openmpi/bin/mpic++ )
# Choose either STATIC or SHARED.
set(LIBRARY_TYPE STATIC)
......@@ -24,9 +25,11 @@ set(OPEN_MPI_INCL_DIR /Users/Shared/LibraryVersions/clang/Openmpi/include )
set(OPEN_MPI_LIB_DIR /Users/Shared/LibraryVersions/clang/Openmpi/lib )
# BLAS Library.
# If BLAS_CUSTOM_LINKER is true, BLAS_LIB field must give the command use to link with Blas. For instance on macOS it is usually "-framework Accelerate" Beware: The quotes are important (otherwise CMake will mute this into -framework -Accelerate).
# If False, FindLibrary is used to find the Blas library to be used, as for the other libraries in this file. The difference is that the name of the .a, .so or .dylib is not known, so it must be given in BLAS_LIB_NAME field. For instance openblas to find libopenblas.a in BLAS_LIB_DIR.
set(BLAS_CUSTOM_LINKER True)
set(BLAS_LIB_DIR None)
set(BLAS_LIB -framework Accelerate )
set(BLAS_LIB "-framework Accelerate" )
# Petsc library.
set(PETSC_GENERAL_INCL_DIR /Users/Shared/LibraryVersions/clang/Petsc/include )
......
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