Skip to content

Commit

Permalink
Fix the windows build (#1501)
Browse files Browse the repository at this point in the history
Fix the leveldb cmake script
Fix boost build on msvc
Add Clion default build folders to .gitignore

Relates-To: OLPEDGE-2887

Signed-off-by: Mykhailo Kuchma <ext-mykhailo.kuchma@here.com>
  • Loading branch information
mykhailo-kuchma committed Apr 24, 2024
1 parent 21f5f8f commit 66e88d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ CMakeSettings.json

# CLion
.idea/
cmake-build-*
6 changes: 5 additions & 1 deletion external/boost/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
# Download and unpack boost at configure time

if (CMAKE_HOST_WIN32)
set(BOOTSTRAP_CMD bootstrap.bat)
if (MSVC)
set(BOOTSTRAP_CMD "bootstrap.bat msvc")
else()
set(BOOTSTRAP_CMD "bootstrap.bat")
endif(MSVC)
set(B2_CMD b2.exe)
else()
# Reset the CXX (path to compiler) before running bootstrap since we can cross compile.
Expand Down
4 changes: 2 additions & 2 deletions external/leveldb/CMakeLists-leveldb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if(BUILD_SHARED_LIBS)
endif(BUILD_SHARED_LIBS)

add_library(leveldb "")
target_compile_options(leveldb PRIVATE -std=c++11 -Wno-c++11-extensions)
target_compile_options(leveldb PRIVATE -std=c++11)
target_sources(leveldb
PRIVATE
"${PROJECT_BINARY_DIR}/${LEVELDB_PORT_CONFIG_DIR}/port_config.h"
Expand Down Expand Up @@ -267,7 +267,7 @@ target_link_libraries(leveldb PUBLIC Threads::Threads)
add_executable(leveldbutil
"${PROJECT_SOURCE_DIR}/db/leveldbutil.cc"
)
target_compile_options(leveldbutil PRIVATE -std=c++11 -Wno-c++11-extensions)
target_compile_options(leveldbutil PRIVATE -std=c++11)
target_link_libraries(leveldbutil leveldb)

if(LEVELDB_BUILD_TESTS)
Expand Down

0 comments on commit 66e88d7

Please sign in to comment.