Skip to content

Commit

Permalink
[fix] codestyle & msvc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
olegator77 committed May 13, 2018
1 parent 58f82ed commit dc27e0f
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 101 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. See the AUTHORS file for names of contributors.

cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.1)
project(leveldb VERSION 1.21.0 LANGUAGES C CXX)

# This project can use C11, but will gracefully decay down to C89.
Expand Down Expand Up @@ -79,6 +79,12 @@ if(BUILD_SHARED_LIBS)
add_compile_options(-fvisibility=hidden)
endif(BUILD_SHARED_LIBS)

if (MSVC)
add_compile_options (/wd4244 /wd4996 /wd4018 /MP)
# add_compile_options ("/MP")
endif()


add_library(leveldb "")
target_sources(leveldb
PRIVATE
Expand Down
5 changes: 5 additions & 0 deletions port/atomic_pointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ namespace leveldb {
typedef intptr_t ssize_t;
}
#endif

#ifdef DeleteFile
#undef DeleteFile
#endif
#ifdef small
#undef small
#endif
#endif

#if defined(_M_X64) || defined(__x86_64__)
#define ARCH_CPU_X86_FAMILY 1
Expand Down
Loading

0 comments on commit dc27e0f

Please sign in to comment.