diff --git a/CMakeLists.txt b/CMakeLists.txt index f9b2cd1587..6f4cc97d24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,12 @@ project(fdb HOMEPAGE_URL "http://www.foundationdb.org/" LANGUAGES C CXX ASM Java) +if(WIN32) + # C# is currently only supported on Windows. + # On other platforms we find mono manually + enable_language(CSharp) +endif() + set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${PROJECT_SOURCE_DIR}/cmake") message (STATUS "${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}") if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}") diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt index 88c849f68d..441945e1b2 100644 --- a/bindings/c/CMakeLists.txt +++ b/bindings/c/CMakeLists.txt @@ -23,11 +23,8 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/fdb_c.g.S add_custom_target(fdb_c_generated DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/fdb_c.g.S ${CMAKE_CURRENT_BINARY_DIR}/fdb_c_function_pointers.g.h) -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/foundationdb/fdb_c_options.g.h - COMMAND ${MONO_EXECUTABLE} ${VEXILLOGRAPHER_EXE} ${CMAKE_SOURCE_DIR}/fdbclient/vexillographer/fdb.options c ${CMAKE_CURRENT_BINARY_DIR}/foundationdb/fdb_c_options.g.h - DEPENDS ${CMAKE_SOURCE_DIR}/fdbclient/vexillographer/fdb.options vexillographer - COMMENT "Generate C options") -add_custom_target(fdb_c_options DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/foundationdb/fdb_c_options.g.h) +vexillographer_compile(TARGET fdb_c_options LANG c OUT ${CMAKE_CURRENT_BINARY_DIR}/foundationdb/fdb_c_options.g.h + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/foundationdb/fdb_c_options.g.h) include(GenerateExportHeader) diff --git a/bindings/java/CMakeLists.txt b/bindings/java/CMakeLists.txt index a47a7ad11f..e22d5b01a7 100644 --- a/bindings/java/CMakeLists.txt +++ b/bindings/java/CMakeLists.txt @@ -109,11 +109,8 @@ set(GENERATED_JAVA_FILES ${GENERATED_JAVA_DIR}/TransactionOptions.java ${GENERATED_JAVA_DIR}/FDBException.java) -add_custom_command(OUTPUT ${GENERATED_JAVA_FILES} - COMMAND ${MONO_EXECUTABLE} ${VEXILLOGRAPHER_EXE} ${CMAKE_SOURCE_DIR}/fdbclient/vexillographer/fdb.options java ${GENERATED_JAVA_DIR} - DEPENDS ${CMAKE_SOURCE_DIR}/fdbclient/vexillographer/fdb.options vexillographer - COMMENT "Generate Java options") -add_custom_target(fdb_java_options DEPENDS ${GENERATED_JAVA_DIR}/StreamingMode.java) +vexillographer_compile(TARGET fdb_java_options LANG java OUT ${GENERATED_JAVA_DIR} + OUTPUT ${GENERATED_JAVA_FILES}) set(SYSTEM_NAME "linux") if (APPLE) diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 73a0e4b13b..67196a5b73 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -29,14 +29,8 @@ add_custom_target(python_binding ALL DEPENDS ${out_files}) file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/bindings/python/fdb) set(options_file ${PROJECT_BINARY_DIR}/bindings/python/fdb/fdboptions.py) -add_custom_command(OUTPUT ${options_file} - COMMAND ${MONO_EXECUTABLE} ${VEXILLOGRAPHER_EXE} ${CMAKE_SOURCE_DIR}/fdbclient/vexillographer/fdb.options python ${options_file} - DEPENDS ${PROJECT_SOURCE_DIR}/fdbclient/vexillographer/fdb.options vexillographer - COMMENT "Generate Python options") -add_custom_target(fdb_python_options DEPENDS - ${options_file} - ${PROJECT_SOURCE_DIR}/fdbclient/vexillographer/fdb.options - vexillographer) +vexillographer_compile(TARGET fdb_python_options LANG python OUT ${options_file} + OUTPUT ${options_file}) add_dependencies(python_binding fdb_python_options) diff --git a/cmake/CompileActorCompiler.cmake b/cmake/CompileActorCompiler.cmake index aecabddfca..4c39dc7b8e 100644 --- a/cmake/CompileActorCompiler.cmake +++ b/cmake/CompileActorCompiler.cmake @@ -1,36 +1,49 @@ -find_program(MONO_EXECUTABLE mono) -find_program(MCS_EXECUTABLE dmcs) - -if (NOT MCS_EXECUTABLE) - find_program(MCS_EXECUTABLE mcs) -endif() - -set(MONO_FOUND FALSE CACHE INTERNAL "") - -if (NOT MCS_EXECUTABLE) - find_program(MCS_EXECUTABLE mcs) -endif() - -if (MONO_EXECUTABLE AND MCS_EXECUTABLE) - set(MONO_FOUND True CACHE INTERNAL "") -endif() - -if (NOT MONO_FOUND) - message(FATAL_ERROR "Could not find mono") -endif() - set(ACTORCOMPILER_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/flow/actorcompiler/ActorCompiler.cs ${CMAKE_CURRENT_SOURCE_DIR}/flow/actorcompiler/ActorParser.cs ${CMAKE_CURRENT_SOURCE_DIR}/flow/actorcompiler/ParseTree.cs ${CMAKE_CURRENT_SOURCE_DIR}/flow/actorcompiler/Program.cs ${CMAKE_CURRENT_SOURCE_DIR}/flow/actorcompiler/Properties/AssemblyInfo.cs) -set(ACTOR_COMPILER_REFERENCES - "-r:System,System.Core,System.Xml.Linq,System.Data.DataSetExtensions,Microsoft.CSharp,System.Data,System.Xml") +if(WIN32) + add_executable(actorcompiler ${ACTORCOMPILER_SRCS}) + target_compile_options(actorcompiler PRIVATE "/langversion:6") + set_property(TARGET actorcompiler PROPERTY VS_DOTNET_REFERENCES + "System" + "System.Core" + "System.Xml.Linq" + "System.Data.DataSetExtensions" + "Microsoft.CSharp" + "System.Data" + "System.Xml") +else() + find_program(MONO_EXECUTABLE mono) + find_program(MCS_EXECUTABLE dmcs) -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/actorcompiler.exe - COMMAND ${MCS_EXECUTABLE} ARGS ${ACTOR_COMPILER_REFERENCES} ${ACTORCOMPILER_SRCS} "-target:exe" "-out:actorcompiler.exe" - DEPENDS ${ACTORCOMPILER_SRCS} - COMMENT "Compile actor compiler" VERBATIM) -add_custom_target(actorcompiler DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/actorcompiler.exe) -set(actor_exe "${CMAKE_CURRENT_BINARY_DIR}/actorcompiler.exe") + if (NOT MCS_EXECUTABLE) + find_program(MCS_EXECUTABLE mcs) + endif() + + set(MONO_FOUND FALSE CACHE INTERNAL "") + + if (NOT MCS_EXECUTABLE) + find_program(MCS_EXECUTABLE mcs) + endif() + + if (MONO_EXECUTABLE AND MCS_EXECUTABLE) + set(MONO_FOUND True CACHE INTERNAL "") + endif() + + if (NOT MONO_FOUND) + message(FATAL_ERROR "Could not find mono") + endif() + + set(ACTOR_COMPILER_REFERENCES + "-r:System,System.Core,System.Xml.Linq,System.Data.DataSetExtensions,Microsoft.CSharp,System.Data,System.Xml") + + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/actorcompiler.exe + COMMAND ${MCS_EXECUTABLE} ARGS ${ACTOR_COMPILER_REFERENCES} ${ACTORCOMPILER_SRCS} "-target:exe" "-out:actorcompiler.exe" + DEPENDS ${ACTORCOMPILER_SRCS} + COMMENT "Compile actor compiler" VERBATIM) + add_custom_target(actorcompiler DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/actorcompiler.exe) + set(actor_exe "${CMAKE_CURRENT_BINARY_DIR}/actorcompiler.exe") +endif() diff --git a/cmake/CompileVexillographer.cmake b/cmake/CompileVexillographer.cmake index 80d0518b82..ac82a75665 100644 --- a/cmake/CompileVexillographer.cmake +++ b/cmake/CompileVexillographer.cmake @@ -6,20 +6,41 @@ set(VEXILLOGRAPHER_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/fdbclient/vexillographer/ruby.cs ${CMAKE_CURRENT_SOURCE_DIR}/fdbclient/vexillographer/vexillographer.cs) -set(VEXILLOGRAPHER_REFERENCES "-r:System,System.Core,System.Data,System.Xml,System.Xml.Linq") -set(VEXILLOGRAPHER_EXE "${CMAKE_CURRENT_BINARY_DIR}/vexillographer.exe") -add_custom_command(OUTPUT ${VEXILLOGRAPHER_EXE} - COMMAND ${MCS_EXECUTABLE} ARGS ${VEXILLOGRAPHER_REFERENCES} ${VEXILLOGRAPHER_SRCS} -target:exe -out:${VEXILLOGRAPHER_EXE} - DEPENDS ${VEXILLOGRAPHER_SRCS} - COMMENT "Compile Vexillographer") -add_custom_target(vexillographer DEPENDS ${VEXILLOGRAPHER_EXE}) +if(WIN32) + add_executable(vexillographer ${VEXILLOGRAPHER_SRCS}) + target_compile_options(vexillographer PRIVATE "/langversion:6") + set_property(TARGET vexillographer PROPERTY VS_DOTNET_REFERENCES + "System" + "System.Core" + "System.Data" + "System.Xml" + "System.Xml.Linq") +else() + set(VEXILLOGRAPHER_REFERENCES "-r:System,System.Core,System.Data,System.Xml,System.Xml.Linq") + set(VEXILLOGRAPHER_EXE "${CMAKE_CURRENT_BINARY_DIR}/vexillographer.exe") + add_custom_command(OUTPUT ${VEXILLOGRAPHER_EXE} + COMMAND ${MCS_EXECUTABLE} ARGS ${VEXILLOGRAPHER_REFERENCES} ${VEXILLOGRAPHER_SRCS} -target:exe -out:${VEXILLOGRAPHER_EXE} + DEPENDS ${VEXILLOGRAPHER_SRCS} + COMMENT "Compile Vexillographer") + add_custom_target(vexillographer DEPENDS ${VEXILLOGRAPHER_EXE}) +endif() -set(ERROR_GEN_SRCS - ${CMAKE_CURRENT_SOURCE_DIR}/flow/error_gen.cs) -set(ERROR_GEN_REFERENCES "-r:System,System.Core,System.Data,System.Xml,System.Xml.Linq") -set(ERROR_GEN_EXE "${CMAKE_CURRENT_BINARY_DIR}/error_gen.exe") -add_custom_command (OUTPUT ${ERROR_GEN_EXE} - COMMAND ${MCS_EXECUTABLE} ARGS ${ERROR_GEN_REFERENCES} ${ERROR_GEN_SRCS} -target:exe -out:${ERROR_GEN_EXE} - DEPENDS ${ERROR_GEN_SRCS} - COMMENT "Compile error_gen") -add_custom_target(error_gen DEPENDS ${ERROR_GEN_EXE}) +macro(vexillographer_compile) + set(CX_ONE_VALUE_ARGS TARGET LANG OUT) + set(CX_MULTI_VALUE_ARGS OUTPUT) + cmake_parse_arguments(VX "" "${CX_ONE_VALUE_ARGS}" "${CX_MULTI_VALUE_ARGS}" "${ARGN}") + if(WIN32) + add_custom_command( + OUTPUT ${VX_OUTPUT} + COMMAND $ ${CMAKE_SOURCE_DIR}/fdbclient/vexillographer/fdb.options ${VX_LANG} ${VX_OUT} + DEPENDS ${CMAKE_SOURCE_DIR}/fdbclient/vexillographer/fdb.options vexillographer + COMMENT "Generate FDBOptions ${VX_LANG} files") + else() + add_custom_command( + OUTPUT ${VX_OUTPUT} + COMMAND ${MONO_EXECUTABLE} ${VEXILLOGRAPHER_EXE} ${CMAKE_SOURCE_DIR}/fdbclient/vexillographer/fdb.options ${VX_LANG} ${VX_OUT} + DEPENDS ${CMAKE_SOURCE_DIR}/fdbclient/vexillographer/fdb.options vexillographer + COMMENT "Generate FDBOptions ${VX_LANG} files") + endif() + add_custom_target(${VX_TARGET} DEPENDS ${VX_OUTPUT}) +endmacro() diff --git a/cmake/ConfigureCompiler.cmake b/cmake/ConfigureCompiler.cmake index 7cdbd0e4ad..9b070f53a3 100644 --- a/cmake/ConfigureCompiler.cmake +++ b/cmake/ConfigureCompiler.cmake @@ -40,7 +40,7 @@ set(CMAKE_REQUIRED_LIBRARIES c) if(WIN32) - add_compile_options(/W3 /EHsc) + add_compile_options(/W3 /EHsc /std:c++11) else() if(USE_GOLD_LINKER) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags") diff --git a/cmake/FlowCommands.cmake b/cmake/FlowCommands.cmake index 8e009b9efb..cd3cdea4ec 100644 --- a/cmake/FlowCommands.cmake +++ b/cmake/FlowCommands.cmake @@ -31,10 +31,17 @@ macro(actor_compile target srcs) set(actor_compiler_flags "--disable-actor-without-wait-error") endif() if(tmp) - add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${tmp}" - COMMAND ${MONO_EXECUTABLE} ${actor_exe} "${CMAKE_CURRENT_SOURCE_DIR}/${src}" "${CMAKE_CURRENT_BINARY_DIR}/${tmp}" ${actor_compiler_flags} > /dev/null - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${src}" actorcompiler ${actor_exe} - COMMENT "Compile actor: ${src}") + if(WIN32) + add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${tmp}" + COMMAND $ "${CMAKE_CURRENT_SOURCE_DIR}/${src}" "${CMAKE_CURRENT_BINARY_DIR}/${tmp}" ${actor_compiler_flags} + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${src}" actorcompiler ${actor_exe} + COMMENT "Compile actor: ${src}") + else() + add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${tmp}" + COMMAND ${MONO_EXECUTABLE} ${actor_exe} "${CMAKE_CURRENT_SOURCE_DIR}/${src}" "${CMAKE_CURRENT_BINARY_DIR}/${tmp}" ${actor_compiler_flags} > /dev/null + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${src}" actorcompiler ${actor_exe} + COMMENT "Compile actor: ${src}") + endif() set(_tmp_out "${_tmp_out};${CMAKE_CURRENT_BINARY_DIR}/${tmp}") endif() endforeach() diff --git a/cmake/InstallLayout.cmake b/cmake/InstallLayout.cmake index 96f6c225a9..444dc15a53 100644 --- a/cmake/InstallLayout.cmake +++ b/cmake/InstallLayout.cmake @@ -9,55 +9,53 @@ if(DIR_LAYOUT MATCHES "TARGZ") set(DIR_LAYOUT "STANDALONE") endif() -if(UNIX) - get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) - set(FDB_CONFIG_DIR "etc/foundationdb") - if("${LIB64}" STREQUAL "TRUE") - set(LIBSUFFIX 64) +get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) +set(FDB_CONFIG_DIR "etc/foundationdb") +if("${LIB64}" STREQUAL "TRUE") + set(LIBSUFFIX 64) +else() + set(LIBSUFFIX "") +endif() +set(FDB_LIB_NOSUFFIX "lib") +if(DIR_LAYOUT MATCHES "STANDALONE") + set(FDB_LIB_DIR "lib${LIBSUFFIX}") + set(FDB_LIBEXEC_DIR "${FDB_LIB_DIR}") + set(FDB_BIN_DIR "bin") + set(FDB_SBIN_DIR "sbin") + set(FDB_INCLUDE_INSTALL_DIR "include") + set(FDB_PYTHON_INSTALL_DIR "${FDB_LIB_DIR}/python2.7/site-packages/fdb") + set(FDB_SHARE_DIR "share") +elseif(DIR_LAYOUT MATCHES "OSX") + set(CPACK_GENERATOR productbuild) + set(CPACK_PACKAGING_INSTALL_PREFIX "/") + set(FDB_LIB_DIR "usr/local/lib") + set(FDB_LIB_NOSUFFIX "usr/lib") + set(FDB_LIBEXEC_DIR "usr/local/libexec") + set(FDB_BIN_DIR "usr/local/bin") + set(FDB_SBIN_DIR "usr/local/sbin") + set(FDB_INCLUDE_INSTALL_DIR "usr/local/include") + set(FDB_PYTHON_INSTALL_DIR "Library/Python/2.7/site-packages/fdb") + set(FDB_SHARE_DIR "usr/local/share") +elseif(DIR_LAYOUT MATCHES "WIN") + # TODO +else() + # for deb and rpm + if(INSTALL_LAYOUT MATCHES "RPM") + set(CPACK_GENERATOR "RPM") else() - set(LIBSUFFIX "") - endif() - set(FDB_LIB_NOSUFFIX "lib") - if(DIR_LAYOUT MATCHES "STANDALONE") - set(FDB_LIB_DIR "lib${LIBSUFFIX}") - set(FDB_LIBEXEC_DIR "${FDB_LIB_DIR}") - set(FDB_BIN_DIR "bin") - set(FDB_SBIN_DIR "sbin") - set(FDB_INCLUDE_INSTALL_DIR "include") - set(FDB_PYTHON_INSTALL_DIR "${FDB_LIB_DIR}/python2.7/site-packages/fdb") - set(FDB_SHARE_DIR "share") - elseif(DIR_LAYOUT MATCHES "OSX") - set(CPACK_GENERATOR productbuild) - set(CPACK_PACKAGING_INSTALL_PREFIX "/") - set(FDB_LIB_DIR "usr/local/lib") - set(FDB_LIB_NOSUFFIX "usr/lib") - set(FDB_LIBEXEC_DIR "usr/local/libexec") - set(FDB_BIN_DIR "usr/local/bin") - set(FDB_SBIN_DIR "usr/local/sbin") - set(FDB_INCLUDE_INSTALL_DIR "usr/local/include") - set(FDB_PYTHON_INSTALL_DIR "Library/Python/2.7/site-packages/fdb") - set(FDB_SHARE_DIR "usr/local/share") - elseif(DIR_LAYOUT MATCHES "WIN") - # TODO - else() - # for deb and rpm - if(INSTALL_LAYOUT MATCHES "RPM") - set(CPACK_GENERATOR "RPM") - else() - # DEB - set(CPACK_GENERATOR "DEB") - endif() - set(CMAKE_INSTALL_PREFIX "/") - set(CPACK_PACKAGING_INSTALL_PREFIX "/") - set(FDB_LIB_DIR "usr/lib${LIBSUFFIX}") - set(FDB_LIB_NOSUFFIX "usr/lib") - set(FDB_LIBEXEC_DIR "${FDB_LIB_DIR}") - set(FDB_BIN_DIR "usr/bin") - set(FDB_SBIN_DIR "usr/sbin") - set(FDB_INCLUDE_INSTALL_DIR "usr/include") - set(FDB_PYTHON_INSTALL_DIR "${FDB_LIB_DIR}/python2.7/site-packages/fdb") - set(FDB_SHARE_DIR "usr/share") + # DEB + set(CPACK_GENERATOR "DEB") endif() + set(CMAKE_INSTALL_PREFIX "/") + set(CPACK_PACKAGING_INSTALL_PREFIX "/") + set(FDB_LIB_DIR "usr/lib${LIBSUFFIX}") + set(FDB_LIB_NOSUFFIX "usr/lib") + set(FDB_LIBEXEC_DIR "${FDB_LIB_DIR}") + set(FDB_BIN_DIR "usr/bin") + set(FDB_SBIN_DIR "usr/sbin") + set(FDB_INCLUDE_INSTALL_DIR "usr/include") + set(FDB_PYTHON_INSTALL_DIR "${FDB_LIB_DIR}/python2.7/site-packages/fdb") + set(FDB_SHARE_DIR "usr/share") endif() ################################################################################ diff --git a/fdbclient/CMakeLists.txt b/fdbclient/CMakeLists.txt index 5637501c8f..1f7a00e11a 100644 --- a/fdbclient/CMakeLists.txt +++ b/fdbclient/CMakeLists.txt @@ -84,11 +84,8 @@ set(FDBCLIENT_SRCS ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.cpp) -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.h ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.cpp - COMMAND ${MONO_EXECUTABLE} ${VEXILLOGRAPHER_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/vexillographer/fdb.options cpp ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/vexillographer/fdb.options vexillographer - COMMENT "Generate FDBOptions c++ files") -add_custom_target(fdboptions DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.h ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.cpp) +vexillographer_compile(TARGET fdboptions LANG cpp OUT ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.h ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.cpp) actor_set(FDBCLIENT_BUILD "${FDBCLIENT_SRCS}") add_library(fdbclient STATIC ${FDBCLIENT_BUILD}) diff --git a/fdbmonitor/fdbmonitor.cpp b/fdbmonitor/fdbmonitor.cpp index 506cfb3078..9dbaeb89c3 100644 --- a/fdbmonitor/fdbmonitor.cpp +++ b/fdbmonitor/fdbmonitor.cpp @@ -20,7 +20,9 @@ #include #include +#ifndef _WIN32 #include +#endif #include #ifdef __linux__ diff --git a/flow/IRandom.h b/flow/IRandom.h index c8362e23ef..c1e701ff26 100644 --- a/flow/IRandom.h +++ b/flow/IRandom.h @@ -29,6 +29,7 @@ #else #include #endif +#include class UID { uint64_t part[2]; @@ -60,7 +61,7 @@ template void save( Ar& ar, UID const& uid ) { const_cast(uid). namespace std { template <> - class hash : public unary_function { + class hash { public: size_t operator()(UID const& u) const { return u.hash(); } }; diff --git a/flow/Platform.cpp b/flow/Platform.cpp index 02d696b6b8..51e2e492c5 100644 --- a/flow/Platform.cpp +++ b/flow/Platform.cpp @@ -47,9 +47,8 @@ #include "flow/FaultInjection.h" #ifdef _WIN32 +#define NOMINMAX #include -#undef max -#undef min #include #include #include