diff --git a/sycl/cmake/modules/FetchEmhash.cmake b/sycl/cmake/modules/FetchEmhash.cmake index df7da1cf7b95d..ab4a374f217ab 100644 --- a/sycl/cmake/modules/FetchEmhash.cmake +++ b/sycl/cmake/modules/FetchEmhash.cmake @@ -1,4 +1,7 @@ # Finds or fetches emhash. +if(DEFINED SYCL_EMHASH_DIR OR DEFINED EMHASH_SYS_LOC) + return() +endif() find_file(EMHASH_SYS_LOC "hash_table8.hpp" PATH_SUFFIXES "emhash") if(NOT EMHASH_SYS_LOC) set(EMHASH_REPO https://github.com/ktprime/emhash) diff --git a/xptifw/src/CMakeLists.txt b/xptifw/src/CMakeLists.txt index 566a7f001a0f4..de22741295826 100644 --- a/xptifw/src/CMakeLists.txt +++ b/xptifw/src/CMakeLists.txt @@ -1,9 +1,11 @@ # Fetch third party headers include(FetchContent) -# The sycl target should download or find emhash. +# The sycl target should download or find emhash but may not +# for standalone builds. if (NOT SYCL_EMHASH_DIR) - message(FATAL_ERROR "emhash headers not found") + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../sycl/cmake/modules") + include(FetchEmhash) endif() set(PARALLEL_HASHMAP_REPO https://github.com/greg7mdp/parallel-hashmap.git)