[ https://issues.apache.org/jira/browse/THRIFT-3873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15674976#comment-15674976 ]
ASF GitHub Bot commented on THRIFT-3873: ---------------------------------------- Github user jeking3 commented on a diff in the pull request: https://github.com/apache/thrift/pull/1128#discussion_r88560045 --- 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 -- I was able to move this into thriftc.ll however we still need the /FIstdint.h to avoid compiler warnings. > Fix various compiler warnings when using VS2010 > ----------------------------------------------- > > Key: THRIFT-3873 > URL: https://issues.apache.org/jira/browse/THRIFT-3873 > Project: Thrift > Issue Type: Bug > Components: C++ - Library > Affects Versions: 0.10.0 > Environment: VS2010, Windows > Reporter: James E. King, III > Assignee: James E. King, III > Priority: Trivial > > While verifying a defect I had to build the windows thrift C++ library and > found a number of compiler warnings that needed to be cleaned up. -- This message was sent by Atlassian JIRA (v6.3.4#6332)