From 8ad6d64829d88117d011f5680583bff5aaf0731d Mon Sep 17 00:00:00 2001 From: Mykhailo Kuchma Date: Wed, 24 Apr 2024 08:45:40 +0200 Subject: [PATCH] Fix the windows build 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 --- .gitignore | 1 + external/boost/CMakeLists.txt | 6 +++++- external/leveldb/CMakeLists-leveldb.txt | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index defe42f66..d5851d4e1 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,4 @@ CMakeSettings.json # CLion .idea/ +cmake-build-* diff --git a/external/boost/CMakeLists.txt b/external/boost/CMakeLists.txt index 7acdd7287..618d0fe09 100644 --- a/external/boost/CMakeLists.txt +++ b/external/boost/CMakeLists.txt @@ -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. diff --git a/external/leveldb/CMakeLists-leveldb.txt b/external/leveldb/CMakeLists-leveldb.txt index 5447bd5bf..e1a9e33cc 100644 --- a/external/leveldb/CMakeLists-leveldb.txt +++ b/external/leveldb/CMakeLists-leveldb.txt @@ -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" @@ -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)