feat(solver-bootstrap): step 2 — dependency-smoke-tests

This commit is contained in:
KOKO\Mimi
2026-07-30 12:51:02 +09:00
parent 644d307abe
commit e0348d80bf
3 changed files with 134 additions and 1 deletions
+52 -1
View File
@@ -1,3 +1,54 @@
include_guard(GLOBAL)
# Third-party package discovery is added by the dependency smoke-test step.
if(NOT WIN32 OR NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
message(FATAL_ERROR "FESA dependencies require a Windows x64 build.")
endif()
set(MKL_ARCH intel64)
set(MKL_INTERFACE lp64)
set(MKL_LINK dynamic)
set(MKL_THREADING tbb_thread)
find_package(MKL CONFIG REQUIRED)
find_package(TBB CONFIG REQUIRED COMPONENTS tbb)
find_package(HDF5 CONFIG REQUIRED COMPONENTS C shared)
find_package(GTest CONFIG REQUIRED)
function(fesa_require_imported_target target_name)
if(NOT TARGET "${target_name}")
message(
FATAL_ERROR
"Required imported target '${target_name}' is unavailable. "
"Verify the installed x64 package and its runtime DLLs."
)
endif()
get_target_property(target_is_imported "${target_name}" IMPORTED)
if(NOT target_is_imported)
message(
FATAL_ERROR
"Dependency target '${target_name}' must be provided by an "
"installed package."
)
endif()
endfunction()
fesa_require_imported_target(MKL::MKL)
fesa_require_imported_target(TBB::tbb)
fesa_require_imported_target(hdf5::hdf5-shared)
fesa_require_imported_target(GTest::gtest_main)
fesa_require_imported_target(GTest::gtest)
fesa_require_imported_target(GTest::gmock)
add_library(HDF5::HDF5 INTERFACE IMPORTED GLOBAL)
set_property(
TARGET HDF5::HDF5
PROPERTY INTERFACE_LINK_LIBRARIES hdf5::hdf5-shared
)
set(
FESA_DEPENDENCY_RUNTIME_MODIFICATIONS
"PATH=path_list_prepend:${MKL_DLL_DIR}"
"PATH=path_list_prepend:$<TARGET_FILE_DIR:TBB::tbb>"
"PATH=path_list_prepend:$<TARGET_FILE_DIR:hdf5::hdf5-shared>"
)