diff --git a/CMakeLists.txt b/CMakeLists.txt index a79a4c36d..7bc74255a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,7 +238,7 @@ add_library(erf_api) if (BUILD_SHARED_LIBS) set_target_properties(erf_api PROPERTIES POSITION_INDEPENDENT_CODE ON) endif() -if (ERF_GPU_BACKEND STREQUAL "CUDA") +if (ERF_ENABLE_CUDA) setup_target_for_cuda_compilation(erf_api) endif () target_link_libraries(erf_api PUBLIC erf_srclib)