Skip to content

Commit 0aadbca

Browse files
committed
Fix MSVC implicit include flags and leveldb patch command
1 parent 996f5d3 commit 0aadbca

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

app/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,9 @@ endif()
315315
# used to ensure these C/C++ headers are not passed to the Swift compiler.
316316
if(MSVC)
317317
add_compile_options(
318-
$<$<COMPILE_LANGUAGE:CXX>:/FI"assert.h" /FI"string.h" /FI"stdint.h">)
318+
$<$<COMPILE_LANGUAGE:CXX>:/FI"assert.h">
319+
$<$<COMPILE_LANGUAGE:CXX>:/FI"string.h">
320+
$<$<COMPILE_LANGUAGE:CXX>:/FI"stdint.h">)
319321
elseif(APPLE)
320322
add_compile_options(
321323
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include assert.h>"

cmake/external/leveldb.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ endif()
2121
if (DESKTOP AND MSVC)
2222
set(patch_file
2323
${CMAKE_CURRENT_LIST_DIR}/../../scripts/git/patches/leveldb/0001-leveldb-1.23-windows-paths.patch)
24+
set(leveldb_patch_cmd PATCH_COMMAND git apply ${patch_file} && git gc --aggressive)
25+
else()
26+
set(leveldb_patch_cmd "")
2427
endif()
2528

2629
# This version must be kept in sync with the version in firestore.patch.txt.
@@ -42,5 +45,5 @@ ExternalProject_Add(
4245
INSTALL_COMMAND ""
4346
TEST_COMMAND ""
4447
HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}"
45-
PATCH_COMMAND git apply ${patch_file} && git gc --aggressive
48+
${leveldb_patch_cmd}
4649
)

0 commit comments

Comments
 (0)