From 6219f7f298201b098118ab59bdd39426404b6d20 Mon Sep 17 00:00:00 2001 From: Alexander Penev <7923188+alexander-penev@users.noreply.github.com> Date: Sat, 30 Sep 2023 12:14:57 +0300 Subject: [PATCH] Automatically find and configure kernels (#70) --- CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b690c418..f22292f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,12 +75,11 @@ function(configure_kernel kernel) endforeach() endfunction() -configure_kernel("share/jupyter/kernels/xcpp11") -configure_kernel("share/jupyter/kernels/xcpp14") -configure_kernel("share/jupyter/kernels/xcpp17") -configure_kernel("share/jupyter/kernels/clad-xcpp17") -configure_kernel("share/jupyter/kernels/cuda-xcpp17") -configure_kernel("share/jupyter/kernels/omp-xcpp17") +file(GLOB _kernels LIST_DIRECTORIES true RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "share/jupyter/kernels/*") +foreach(_kernel IN LISTS _kernels) + message("Configure kernel: ${_kernel}") + configure_kernel("${_kernel}") +endforeach() ################ # Dependencies #