diff options
| author | Charles E. Rolke <chug@apache.org> | 2011-08-04 20:17:09 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2011-08-04 20:17:09 +0000 |
| commit | e95be9c27959221fce9d501eab220be81d786983 (patch) | |
| tree | 6e6f74a5f607730b7b4738a11ab218ef2d510848 /qpid/cpp/src/CMakeLists.txt | |
| parent | 427d1f82fd7ee9d6f4ad573330c85bd2fd30547d (diff) | |
| download | qpid-python-e95be9c27959221fce9d501eab220be81d786983.tar.gz | |
QPID-2643 Building QPID with Visual Studio 2010
This patch changes:
List.h - add a typedef from the original post
IntegerTypes.h - adds 'signed' to int_8 to avoid MSVC complaint
SessionState.cpp, qpid-perftest.cpp - adds explicit boost:: to disambiguate methods recently defined by 'using std'.
CMakeLists.txt -
Adds a CMake option that allows user to include '#define _WIN32_WINNT=0x0502' or not.
Linux users see no change.
This replaces CMake code that includes a similar definition when the build system _has VS2005 installed_.
Even if the Generator is VS2010 the def was added because VS2005 is installed. This in not right.
Without this definition several components define _WIN32_WINNT=0x0501 to target network and system api components.
Those components will still work correctly with 0x0502.
Defining _WIN32_WINNT=0x0501 across the board causes a build error in cpp\qpid\store that 0x0502 avoids.
This patch will move the minimum required version of Windows from WinXP to WinXP-SP3.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1153993 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/CMakeLists.txt')
| -rw-r--r-- | qpid/cpp/src/CMakeLists.txt | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index 80315b964c..b0ea19709b 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -580,6 +580,15 @@ include (ssl.cmake) check_symbol_exists (LOG_AUTHPRIV "sys/syslog.h" HAVE_LOG_AUTHPRIV) check_symbol_exists (LOG_FTP "sys/syslog.h" HAVE_LOG_FTP) +# Allow MSVC user to select 'WinXP-SP3/Windows Server 2003' as build target version +set (win32_winnt_default OFF) +if (CMAKE_SYSTEM_NAME STREQUAL Windows) + if (MSVC) + set (win32_winnt_default ON) + endif (MSVC) +endif (CMAKE_SYSTEM_NAME STREQUAL Windows) +option(SET_WIN32_WINNT "In Windows-MSVC build: define _WIN32_WINNT=0x0502 to select target version: Windows XP with SP3" ${win32_winnt_default}) + if (CMAKE_SYSTEM_NAME STREQUAL Windows) if (MSVC) add_definitions( @@ -590,9 +599,9 @@ if (CMAKE_SYSTEM_NAME STREQUAL Windows) /wd4800 /wd4355 ) - if (MSVC80) - add_definitions(/D "_WIN32_WINNT=0x0501") - endif (MSVC80) + if (SET_WIN32_WINNT) + add_definitions(/D "_WIN32_WINNT=0x0502") + endif (SET_WIN32_WINNT) # set the RelWithDebInfo compile/link switches to equal Release set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /O2 /Ob2 /D NDEBUG") |
