add_definitions("-DHAVE_CONFIG_H")
-# For Windows, all compilers used by CMake should support large files
if(WIN32)
- set(USE_WIN32_LARGE_FILES ON)
+ # _fseeki64() requires VS2005
+ if(NOT MSVC OR (MSVC_VERSION GREATER_EQUAL 1400))
+ set(USE_WIN32_LARGE_FILES ON)
+ endif()
# Use the manifest embedded in the Windows Resource
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -DCURL_EMBED_MANIFEST")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
endif()
- # Use multithreaded compilation on VS 2008+
+ # Use multithreaded compilation on VS2008+
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION GREATER_EQUAL 1500)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
endif()
/* LARGE FILE SUPPORT */
/* ---------------------------------------------------------------- */
-#if defined(_MSC_VER) || defined(__MINGW32__)
+/* _fseeki64() requires VS2005 */
+#if (defined(_MSC_VER) && (_MSC_VER >= 1400)) || defined(__MINGW32__)
# define USE_WIN32_LARGE_FILES
/* Number of bits in a file offset, on hosts where this is settable. */
# ifdef __MINGW32__