Skip to content

Commit

Permalink
Need to find MKL if ginkgo is static
Browse files Browse the repository at this point in the history
  • Loading branch information
yhmtsai committed Jul 16, 2021
1 parent c43760e commit 318603a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/GinkgoConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ set(GINKGO_AMD_ARCH_FLAGS @GINKGO_AMD_ARCH_FLAGS@)

set(GINKGO_DPCPP_VERSION @GINKGO_DPCPP_VERSION@)
set(GINKGO_DPCPP_FLAGS @GINKGO_DPCPP_FLAGS@)
set(GINKGO_MKL_ROOT @GINKGO_MKL_ROOT@)

set(GINKGO_HAVE_PAPI_SDE @GINKGO_HAVE_PAPI_SDE@)

Expand Down Expand Up @@ -168,4 +169,8 @@ if((NOT GINKGO_BUILD_SHARED_LIBS) AND GINKGO_BUILD_HIP)
find_package(rocrand REQUIRED)
endif()

if((NOT GINKGO_BUILD_SHARED_LIBS) AND GINKGO_BUILD_DPCPP)
find_package(MKL CONFIG REQUIRED HINTS "${GINKGO_MKL_ROOT}")
endif()

include(${CMAKE_CURRENT_LIST_DIR}/GinkgoTargets.cmake)
1 change: 1 addition & 0 deletions dpcpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ginkgo_extract_dpcpp_version(${CMAKE_CXX_COMPILER} GINKGO_DPCPP_VERSION)
set(GINKGO_DPCPP_VERSION ${GINKGO_DPCPP_VERSION} PARENT_SCOPE)

find_package(MKL CONFIG REQUIRED HINTS "$ENV{MKLROOT}")
set(GINKGO_MKL_ROOT "${MKL_ROOT}" PARENT_SCOPE)

add_library(ginkgo_dpcpp $<TARGET_OBJECTS:ginkgo_dpcpp_device> "")
target_sources(ginkgo_dpcpp
Expand Down

0 comments on commit 318603a

Please sign in to comment.