From aac0ee0115c886fdc719ea1009b7820ec071f8a9 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Wed, 6 Sep 2023 23:09:19 +0200 Subject: [PATCH] Exclude some more and build by default under debug --- src/realm/CMakeLists.txt | 6 +++++- src/realm/exec/CMakeLists.txt | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/realm/CMakeLists.txt b/src/realm/CMakeLists.txt index f4751827f94..3bc4464bb13 100644 --- a/src/realm/CMakeLists.txt +++ b/src/realm/CMakeLists.txt @@ -412,6 +412,10 @@ if (REALM_ENABLE_SYNC) add_subdirectory(sync) endif() if(NOT REALM_BUILD_LIB_ONLY AND NOT WINDOWS_STORE) - add_subdirectory(exec) + if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + add_subdirectory(exec) + else() + add_subdirectory(exec EXCLUDE_FROM_ALL) + endif() set_macos_only(exec) endif() diff --git a/src/realm/exec/CMakeLists.txt b/src/realm/exec/CMakeLists.txt index de6293d1ef1..16bb966d868 100644 --- a/src/realm/exec/CMakeLists.txt +++ b/src/realm/exec/CMakeLists.txt @@ -20,6 +20,9 @@ set_target_properties(RealmTrawler PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} ) target_link_libraries(RealmTrawler Storage) +if (EMSCRIPTEN) + set_target_properties(RealmTrawler PROPERTIES EXCLUDE_FROM_ALL TRUE) +endif() add_executable(RealmEnumerate realm_enumerate.cpp) set_target_properties(RealmEnumerate PROPERTIES @@ -38,6 +41,9 @@ set_target_properties(RealmDecrypt PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} ) target_link_libraries(RealmDecrypt Storage) +if (NOT REALM_ENABLE_ENCRYPTION) + set_target_properties(RealmDecrypt PROPERTIES EXCLUDE_FROM_ALL TRUE) +endif() add_executable(RealmEncrypt realm_encrypt.cpp) set_target_properties(RealmEncrypt PROPERTIES