From 923712ce3cdc66db5baff21598b84e5fedf02be1 Mon Sep 17 00:00:00 2001 From: Martyn Gigg Date: Thu, 10 Apr 2014 11:52:28 +0100 Subject: [PATCH] Add windows compiler flag to not treat wchar as built in. This is required for the QString::fromStdWString type methods to work and seems to have no ill effect. Refs #9252 --- Code/Mantid/Build/CMake/WindowsSetup.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Code/Mantid/Build/CMake/WindowsSetup.cmake b/Code/Mantid/Build/CMake/WindowsSetup.cmake index e95307292c74..f7a0ce3ea49f 100644 --- a/Code/Mantid/Build/CMake/WindowsSetup.cmake +++ b/Code/Mantid/Build/CMake/WindowsSetup.cmake @@ -29,7 +29,9 @@ endif() # as a level 3 warning # /w34389 - Treat warning C4389, about equality comparison on unsigned # and signed, as a level 3 warning -set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /w34296 /w34389" ) +# /Zc:wchar_t- - Do not treat wchar_t as a builtin type. Required for Qt to +# work with wstring +set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /w34296 /w34389 /Zc:wchar_t-" ) # As discussed here: http://code.google.com/p/googletest/issues/detail?id=412 # gtest requires changing the _VARAIDIC_MAX value for VS2012 as it defaults to 5 if ( MSVC_VERSION EQUAL 1700 )