Skip to content

Commit

Permalink
Use generator expressions when setting compile options for the benchm…
Browse files Browse the repository at this point in the history
…arks. (#4328)

Contributes to SC-32877.

---
TYPE: BUILD
DESC: Use generator expressions when setting compile options for the benchmarks.
  • Loading branch information
teo-tsirpanis authored Sep 19, 2023
1 parent 41bc0f2 commit 7aad625
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions test/benchmarking/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,12 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)


if (WIN32)
if (CMAKE_BUILD_TYPE MATCHES "Debug")
add_compile_options(/DDEBUG /Od /Zi)
elseif (CMAKE_BUILD_TYPE MATCHES "Release")
add_compile_options(/DNDEBUG /Ox)
endif()
if (MSVC)
add_compile_options("$<$<CONFIG:Debug>:/DDEBUG;/Od;/Zi>")
add_compile_options("$<$<CONFIG:Release>:/DNDEBUG;/Ox>")
else()
if (CMAKE_BUILD_TYPE MATCHES "Debug")
add_compile_options(-DDEBUG -O0 -g3 -ggdb3 -gdwarf-3)
elseif (CMAKE_BUILD_TYPE MATCHES "Release")
add_compile_options(-DNDEBUG -O3)
endif()
add_compile_options("$<$<CONFIG:Debug>:-DDEBUG;-O0;-g3;-ggdb3;-gdwarf-3>")
add_compile_options("$<$<CONFIG:Release>:-DNDEBUG;-O3>")
endif()

# Find TileDB
Expand Down

0 comments on commit 7aad625

Please sign in to comment.