Skip to content

Commit

Permalink
Turn optimizations off for some object store tests under msvc and asa…
Browse files Browse the repository at this point in the history
…n due to compilation time
  • Loading branch information
kiburtse committed Aug 21, 2023
1 parent 0fb5920 commit 9486893
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/object-store/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,22 @@ set_target_resources(ObjectStoreTests "${RESOURCES}")
if(MSVC)
# increase the number of sections supported in an obj file for the heavily templated tests
target_compile_options(ObjectStoreTests PRIVATE /bigobj)

# FIXME these files take abysmally long time to compile with asan and any level of optimization
if (REALM_ASAN AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(LONG_COMPILING_FILES
c_api/c_api.cpp collection_change_indices.cpp dictionary.cpp list.cpp migrations.cpp object.cpp
primitive_list.cpp realm.cpp results.cpp sectioned_results.cpp set.cpp transaction_log_parsing.cpp
)
if (REALM_ENABLE_SYNC)
list(APPEND LONG_COMPILING_FILES
sync/client_reset.cpp
sync/remote_mongo_tests.cpp
sync/sync_manager.cpp
)
endif()
set_source_files_properties(${LONG_COMPILING_FILES} PROPERTIES COMPILE_FLAGS "/Od")
endif()
endif()

target_link_libraries(ObjectStoreTests Catch2::Catch2 ObjectStore RealmFFIStatic)
Expand Down

0 comments on commit 9486893

Please sign in to comment.