From 58857de5a5010d5189ea751cc41c9f5d5f84e19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20Dai=C3=9F?= Date: Tue, 25 Jul 2023 20:18:54 -0500 Subject: [PATCH] Add Kokkos dependency to tool targets in Kokkos builds This helps to avoid linking issues where libraries Kokkos and HPX depend on are missing for these targets. Notably, it avoids linking issues with SYCL in sycl-enabled builds (when the dpcpp lib path is not already in LD_LIBRARY_PATHS). --- tools/CMakeLists.txt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 3b51cdccc..a21a00d67 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -3,13 +3,24 @@ # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +################################################################################ +# Additional dependencies as a workaround: These ensure the sycl libs are found +################################################################################ + +if(OCTOTIGER_WITH_KOKKOS) + list(APPEND dependencies_workaround Kokkos::kokkos ) +else() + list(APPEND dependencies_workaround ) +endif() + ################################################################################ # Set up bfilter target ################################################################################ add_hpx_executable( bfilter DEPENDENCIES - Silo::silo Boost::boost Boost::program_options + Silo::silo Boost::boost Boost::program_options ${dependencies_workaround} SOURCES bfilter/bfilter.cpp ) @@ -34,7 +45,7 @@ endif() add_hpx_executable( silo_convert DEPENDENCIES - Silo::silo Boost::boost Boost::program_options + Silo::silo Boost::boost Boost::program_options ${dependencies_workaround} SOURCES silo_convert/plain_silo.cpp silo_convert/silo_convert.cpp @@ -49,7 +60,7 @@ add_hpx_executable( add_hpx_executable( silo_post DEPENDENCIES - Silo::silo Boost::boost Boost::program_options + Silo::silo Boost::boost Boost::program_options ${dependencies_workaround} SOURCES silo_post/silo_post.cpp )