Skip to content

Commit

Permalink
#291: also enable parenthesis operator to cuda and openmp benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
nmm0 committed Nov 2, 2023
1 parent 02abdda commit 0983da4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -61,6 +62,7 @@ function(mdspan_add_openmp_benchmark EXENAME)
target_include_directories(${EXENAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/benchmarks>
)
target_compile_definitions(${EXENAME} PRIVATE MDSPAN_USE_PAREN_OPERATOR=1)
else()
message(WARNING "Not adding target ${EXENAME} because OpenMP was not found")
endif()
Expand Down

0 comments on commit 0983da4

Please sign in to comment.