Skip to content

Commit

Permalink
improve matrix test
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed Dec 9, 2021
1 parent 45f25c9 commit 0070c85
Show file tree
Hide file tree
Showing 2 changed files with 415 additions and 92 deletions.
3 changes: 2 additions & 1 deletion cmake/create_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,14 @@ function(ginkgo_create_common_test test_name)
string(SUBSTRING ${exec} 0 1 exec_initial)
string(SUBSTRING ${exec} 1 -1 exec_tail)
string(TOUPPER ${exec_initial} exec_initial)
string(TOUPPER ${exec} exec_upper)
set(exec_type ${exec_initial}${exec_tail}Executor)
# set up actual test
set(test_target_name ${test_target_name}_${exec})
add_executable(${test_target_name} ${test_name}.cpp)
target_compile_features(${test_target_name} PUBLIC cxx_std_14)
target_compile_options(${test_target_name} PRIVATE ${GINKGO_COMPILER_FLAGS})
target_compile_definitions(${test_target_name} PRIVATE EXEC_TYPE=${exec_type} EXEC_NAMESPACE=${exec})
target_compile_definitions(${test_target_name} PRIVATE EXEC_TYPE=${exec_type} EXEC_NAMESPACE=${exec} GKO_COMPILING_${exec_upper})
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
Loading

0 comments on commit 0070c85

Please sign in to comment.