Skip to content

Commit

Permalink
minimal change for cmake without deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
yhmtsai committed Aug 22, 2023
1 parent 7d22222 commit c325a59
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmake/create_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function(ginkgo_create_common_test test_name)
ginkgo_create_common_test_internal(${test_name} CudaExecutor cuda ${ARGN})
endif()
if(GINKGO_BUILD_SYCL)
ginkgo_create_common_test_internal(${test_name} DpcppExecutor dpcpp ${ARGN})
ginkgo_create_common_test_internal(${test_name} SyclExecutor dpcpp ${ARGN})
endif()
endfunction(ginkgo_create_common_test)

Expand All @@ -220,7 +220,11 @@ function(ginkgo_create_common_test_internal test_name exec_type exec)
# set up actual test
set(test_target_name ${test_target_name}_${exec})
add_executable(${test_target_name} ${test_name}.cpp)
target_compile_definitions(${test_target_name} PRIVATE EXEC_TYPE=${exec_type} EXEC_NAMESPACE=${exec} GKO_COMPILING_${exec_upper})
if(exec STREQUAL "dpcpp")
target_compile_definitions(${test_target_name} PRIVATE EXEC_TYPE=${exec_type} EXEC_NAMESPACE=sycl GKO_COMPILING_${exec_upper})
else()
target_compile_definitions(${test_target_name} PRIVATE EXEC_TYPE=${exec_type} EXEC_NAMESPACE=${exec} GKO_COMPILING_${exec_upper})
endif()
target_link_libraries(${test_target_name} PRIVATE ${common_test_ADDITIONAL_LIBRARIES})
# use float for DPC++ if necessary
if((exec STREQUAL "dpcpp") AND GINKGO_DPCPP_SINGLE_MODE)
Expand Down

0 comments on commit c325a59

Please sign in to comment.