Github user ben-craig commented on a diff in the pull request: https://github.com/apache/thrift/pull/1128#discussion_r87931050 --- Diff: compiler/cpp/CMakeLists.txt --- @@ -18,6 +18,16 @@ # configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/thrift/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/thrift/version.h) +if(MSVC) + # The winflexbison generator outputs some macros that conflict with the Visual Studio 2010 copy of stdint.h + # This might be fixed in later versions of Visual Studio, but an easy solution is to include stdint.h first + if(HAVE_STDINT_H) + add_definitions(/FI"stdint.h") + endif(HAVE_STDINT_H) + + # The generated code also causes a size type warning we cannot work around easily + set_source_files_properties(thriftl.cc PROPERTIES COMPILE_FLAGS /wd4267) --- End diff -- This should be resolved by putting a pragma in the source code. Only put code relevant things in the build system if there are no other alternatives.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---