Skip to content

Commit

Permalink
CMake: set C++17 standard for benchmarks that use re2.
Browse files Browse the repository at this point in the history
  • Loading branch information
skvadrik committed Jul 25, 2023
1 parent 96104a6 commit 0b6d0b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions benchmarks/submatch_dfa_jit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ target_link_libraries(bench_submatch_dfa_jit benchmark::benchmark)
find_path(RE2_INCLUDE_DIRECTORY "re2/re2.h")
find_library(RE2_LIBRARY re2)
if(RE2_INCLUDE_DIRECTORY AND RE2_LIBRARY)
set_target_properties(bench_submatch_dfa_jit PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON)
target_compile_definitions(bench_submatch_dfa_jit PRIVATE "HAVE_RE2_RE2_H=1")
target_include_directories(bench_submatch_dfa_jit PRIVATE "${RE2_INCLUDE_DIRECTORY}")
target_link_libraries(bench_submatch_dfa_jit "${RE2_LIBRARY}")
Expand Down
3 changes: 3 additions & 0 deletions benchmarks/submatch_nfa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ target_link_libraries(bench_submatch_nfa benchmark::benchmark)
find_path(RE2_INCLUDE_DIRECTORY "re2/re2.h")
find_library(RE2_LIBRARY re2)
if(RE2_INCLUDE_DIRECTORY AND RE2_LIBRARY)
set_target_properties(bench_submatch_nfa PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON)
target_compile_definitions(bench_submatch_nfa PRIVATE "HAVE_RE2_RE2_H=1")
target_include_directories(bench_submatch_nfa PRIVATE "${RE2_INCLUDE_DIRECTORY}")
target_link_libraries(bench_submatch_nfa "${RE2_LIBRARY}")
Expand Down

0 comments on commit 0b6d0b5

Please sign in to comment.