From 0983da472762bc59ba268b0412585b3c994756df Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Thu, 2 Nov 2023 09:47:42 -0700 Subject: [PATCH] #291: also enable parenthesis operator to cuda and openmp benchmarks --- benchmarks/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index 3b1ee911..ce0b7453 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -44,6 +44,7 @@ function(mdspan_add_cuda_benchmark EXENAME) string(REPLACE "-pthread" "" _benchmark_libs "${_benchmark_libs_old}") target_include_directories(${EXENAME} PUBLIC "${_benchmark_include}") target_link_libraries(${EXENAME} PUBLIC "${_benchmark_libs};${_benchmark_libs_imported}") + target_compile_definitions(${EXENAME} PRIVATE MDSPAN_USE_PAREN_OPERATOR=1) if(_benchmark_libs_old MATCHES "-pthread") target_compile_options(${EXENAME} PUBLIC "-Xcompiler=-pthread") endif() @@ -61,6 +62,7 @@ function(mdspan_add_openmp_benchmark EXENAME) target_include_directories(${EXENAME} PUBLIC $ ) + target_compile_definitions(${EXENAME} PRIVATE MDSPAN_USE_PAREN_OPERATOR=1) else() message(WARNING "Not adding target ${EXENAME} because OpenMP was not found") endif()