File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -43,15 +43,6 @@ IF (WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
43
43
SKIP_ROCKSDB_PLUGIN ("32-Bit Windows are temporarily disabled" )
44
44
ENDIF ()
45
45
46
- #
47
- # RocksDB's port/win/env_win.cc uses parts of Windows API that are not part
48
- # of the LEAN_AND_MEAN set. Ideally we should undef LEAN_AND_MEAN only for
49
- # that file, but REMOVE_DEFINITIONS only works per-directory?
50
- #
51
- IF (WIN32 )
52
- REMOVE_DEFINITIONS (-DWIN32_LEAN_AND_MEAN )
53
- ENDIF ()
54
-
55
46
# This plugin needs recent C++ compilers (it is using C++11 features)
56
47
# Skip build for the old compilers
57
48
SET (CXX11_FLAGS )
Original file line number Diff line number Diff line change @@ -385,6 +385,13 @@ ENDFOREACH()
385
385
386
386
if (MSVC )
387
387
add_definitions (-DHAVE_SSE42 -DHAVE_PCLMUL )
388
+ # Workaround broken compilation with -DWIN32_LEAN_AND_MEAN
389
+ # (https://github.com/facebook/rocksdb/issues/4344)
390
+ set_source_files_properties (${ROCKSDB_SOURCE_DIR} /port/win/env_win.cc
391
+ PROPERTIES COMPILE_FLAGS "/FI\" windows.h\" /FI\" winioctl.h\" " )
392
+
393
+ # Workaround Win8.1 SDK bug, that breaks /permissive-
394
+ string (REPLACE "/permissive-" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
388
395
else ()
389
396
set (CMAKE_REQUIRED_FLAGS "-msse4.2 -mpclmul ${CXX11_FLAGS} " )
390
397
You can’t perform that action at this time.
0 commit comments