Commit 4367910b authored by Kilian Lackhove's avatar Kilian Lackhove

fix THIRDPARTY_BUILD_BLAS_LAPACK with THIRDPARTY_BUILD_PETSC

parent 3922a427
......@@ -40,6 +40,7 @@ IF(THIRDPARTY_BUILD_BLAS_LAPACK)
-G ${CMAKE_GENERATOR}
-DCMAKE_Fortran_COMPILER:FILEPATH=${CMAKE_Fortran_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_INSTALL_LIBDIR:PATH=${TPDIST}/lib
-DBUILD_SHARED_LIBS:STRING=ON
-DBUILD_TESTING:STRING=OFF
${TPSRC}/lapack-3.7.0
......@@ -47,8 +48,12 @@ IF(THIRDPARTY_BUILD_BLAS_LAPACK)
SET(NATIVE_BLAS blas CACHE FILEPATH "BLAS library" FORCE)
SET(NATIVE_LAPACK lapack CACHE FILEPATH "LAPACK library" FORCE)
SET(NATIVE_BLAS_LIB_DIR ${TPDIST}/lib CACHE FILEPATH "BLAS library dir" FORCE)
SET(NATIVE_LAPACK_LIB_DIR ${TPDIST}/lib CACHE FILEPATH "LAPACK library dir" FORCE)
MARK_AS_ADVANCED(NATIVE_BLAS)
MARK_AS_ADVANCED(NATIVE_LAPACK)
MARK_AS_ADVANCED(NATIVE_BLAS_LIB_DIR)
MARK_AS_ADVANCED(NATIVE_LAPACK_LIB_DIR)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(${TPDIST}/include)
......
......@@ -49,6 +49,7 @@ IF (NEKTAR_USE_PETSC)
# we use a MUMPS build in ordering here, in the future it might make
# sense to hook it up with metis/scotch since this MIGHT be faster
SET(PETSC_MUMPS --download-scalapack --download-mumps)
SET(PETSC_DEPS "")
IF( NEKTAR_USE_BLAS_LAPACK )
IF( NEKTAR_USE_MKL AND MKL_FOUND )
......@@ -56,7 +57,10 @@ IF (NEKTAR_USE_PETSC)
ELSEIF( NEKTAR_USE_WIN32_LAPACK )
SET(PETSC_MUMPS ${PETSC_MUMPS} --with-blas-lapack-dir=${LAPACK_DIR})
ELSEIF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
SET(PETSC_MUMPS ${PETSC_MUMPS} --with-blas-lapack-dir=${NATIVE_BLAS_LIB_DIR};${NATIVE_LAPACK_LIB_DIR})
SET(PETSC_MUMPS ${PETSC_MUMPS} --with-blas-lapack-dir=${NATIVE_LAPACK_LIB_DIR})
IF(THIRDPARTY_BUILD_BLAS_LAPACK)
SET(PETSC_DEPS ${PETSC_DEPS} lapack-3.7.0)
ENDIF()
ELSE()
MESSAGE(STATUS "No suitable blas/lapack found, downloading")
SET(PETSC_MUMPS ${PETSC_MUMPS} --download-fblaslapack)
......@@ -73,6 +77,7 @@ IF (NEKTAR_USE_PETSC)
EXTERNALPROJECT_ADD(
petsc-3.7.2
DEPENDS ${PETSC_DEPS}
PREFIX ${TPSRC}
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
......
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