Skip to content

Commit

Permalink
Make quadmath optional
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Dec 9, 2024
1 parent 64a4344 commit 96fed14
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Driver.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ if (BUILD_SHARED AND USE_MKL)
endif ()
else ()
if (NOT COMPILER_IDENTIFIER MATCHES "vs") # GCC OR CLANG COMPILER
link_libraries(pthread gfortran quadmath openblas)
find_library(HAS_QUADMATH quadmath)
if (HAS_QUADMATH)
link_libraries(quadmath)
endif ()
link_libraries(pthread gfortran openblas)
else () # MSVC COMPILER
if (USE_MPI)
link_libraries(mkl_scalapack_lp64 mkl_blacs_intelmpi_lp64)
Expand Down
7 changes: 6 additions & 1 deletion Option.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,12 @@ else ()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fPIC")
endif ()

link_libraries(dl pthread gfortran quadmath)
link_libraries(dl pthread gfortran)

find_library(HAS_QUADMATH quadmath)
if (HAS_QUADMATH)
link_libraries(quadmath)
endif ()

if (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
link_libraries(stdc++)
Expand Down

0 comments on commit 96fed14

Please sign in to comment.