THRIFT-3873: fix various compiler warnings and overflow errors
THRIFT-3847: change VERSION to PACKAGE_VERSION to avoid conflicts with third party or OS headers

This closes #1128
diff --git a/build/cmake/DefinePlatformSpecifc.cmake b/build/cmake/DefinePlatformSpecifc.cmake
index e57ecc2..496134c 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -71,12 +71,24 @@
       message (FATAL_ERROR "Windows build does not support shared library output yet, please set -DWITH_SHARED_LIB=off")
     endif()
 
+    add_definitions("/MP") # parallel build
+    add_definitions("/W3") # warning level 3
+
+    # VS2010 does not provide inttypes which we need for "PRId64" used in many places
+    find_package(Inttypes)
+    if (Inttypes_FOUND)
+      include_directories(${INTTYPES_INCLUDE_DIRS})
+      # OpenSSL conflicts with the definition of PRId64 unless it is defined first
+      add_definitions("/FIinttypes.h")
+    endif ()
 elseif(UNIX)
   find_program( MEMORYCHECK_COMMAND valgrind )
   set( MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=all --leak-check=full" )
   set( MEMORYCHECK_SUPPRESSIONS_FILE "${PROJECT_SOURCE_DIR}/test/valgrind.suppress" )
 endif()
 
+add_definitions("-D__STDC_FORMAT_MACROS")
+
 # WITH_*THREADS selects which threading library to use
 if(WITH_BOOSTTHREADS)
   add_definitions("-DUSE_BOOST_THREAD=1")