Skip to content

Commit

Permalink
Test build times of unit tests and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
trueqbit committed May 15, 2024
1 parent 8c45222 commit d2607d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ file(GLOB files "*.cpp")
foreach(file ${files})
get_filename_component(file_basename ${file} NAME_WE)
add_executable(${file_basename} ${file})
# only for testing build times
target_compile_definitions(${file_basename} PRIVATE SQLITE_ORM_CONFIG_DISABLE_STATIC_ASSERTIONS=1)
# note: sqlite3 already linked in top-level CMakeLists
target_link_libraries(${file_basename} PRIVATE sqlite_orm)
endforeach()
3 changes: 3 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ add_executable(unit_tests
row_extractor.cpp
)

# only for testing build times
target_compile_definitions(unit_tests PRIVATE SQLITE_ORM_CONFIG_DISABLE_STATIC_ASSERTIONS=1)

if(SQLITE_ORM_OMITS_CODECVT)
message(STATUS "SQLITE_ORM_OMITS_CODECVT is enabled")
target_compile_definitions(unit_tests PRIVATE SQLITE_ORM_OMITS_CODECVT=1)
Expand Down

0 comments on commit d2607d6

Please sign in to comment.