From 6b4c3036aa470d57d6cdea9e22cae961bc413025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Sat, 7 Jun 2014 08:17:20 +0200 Subject: [PATCH] std::min/max are defined in handle error in msvc12 when linking against msvc10 libs --- CMakeLists.txt | 4 ++++ src/DocIterator.h | 2 +- src/Encoding.cpp | 1 + src/mathed/InsetMathBrace.cpp | 1 + src/mathed/MathSupport.cpp | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 48bf540037..5e403abc27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,6 +205,10 @@ if(LYX_DEPENDENCIES_DOWNLOAD) endif() endforeach() set(GNUWIN32_DIR ${LYX_DEPENDENCIES_DIR}/deps20) + if(MSVC12) + # handle error in msvc12 when linking against msvc10 libs + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /vd2") + endif() endif() diff --git a/src/DocIterator.h b/src/DocIterator.h index 3d5647c893..77968191dd 100644 --- a/src/DocIterator.h +++ b/src/DocIterator.h @@ -15,7 +15,7 @@ #include "CursorSlice.h" #include - +#include namespace lyx { diff --git a/src/Encoding.cpp b/src/Encoding.cpp index bc27675f13..a6f6a60ea3 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -25,6 +25,7 @@ #include #include +#include using namespace std; using namespace lyx::support; diff --git a/src/mathed/InsetMathBrace.cpp b/src/mathed/InsetMathBrace.cpp index 105165903d..8b06f6d546 100644 --- a/src/mathed/InsetMathBrace.cpp +++ b/src/mathed/InsetMathBrace.cpp @@ -21,6 +21,7 @@ #include "frontends/Painter.h" #include +#include using namespace std; diff --git a/src/mathed/MathSupport.cpp b/src/mathed/MathSupport.cpp index 21d41dd64e..ff4702ff71 100644 --- a/src/mathed/MathSupport.cpp +++ b/src/mathed/MathSupport.cpp @@ -27,6 +27,7 @@ #include "support/docstream.h" #include +#include using namespace std;