Skip to content

Commit 6b68070

Browse files
author
jef
committed
fix msvc fixes
git-svn-id: http://svn.osgeo.org/qgis/trunk@15213 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 20587d2 commit 6b68070

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/analysis/raster/qgsrastercalcparser.yy

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include "qgsrastercalcnode.h"
2121

2222
#ifdef _MSC_VER
23-
# pragma warnings( disable: 4065 ) // switch statement contains 'default' but no 'case' labels
24-
# pragma warnings( disable: 4701 ) // Potentially uninitialized local variable 'name' used
23+
# pragma warning( disable: 4065 ) // switch statement contains 'default' but no 'case' labels
24+
# pragma warning( disable: 4701 ) // Potentially uninitialized local variable 'name' used
2525
#endif
2626

2727
// don't redeclare malloc/free

src/core/qgssearchstringlexer.ll

+2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
// which doesn't in MSVC compiler
3737
#define YY_NEVER_INTERACTIVE 1
3838

39+
#ifndef YY_NO_UNPUT
3940
#define YY_NO_UNPUT // unused
41+
#endif
4042

4143
#ifdef _MSC_VER
4244
#define YY_NO_UNISTD_H

src/gui/CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,12 @@ IF (WIN32)
135135
ENDIF (MSVC)
136136
ENDIF (WIN32)
137137

138-
IF(NOT MSVC)
139-
# disable deprecation warnings for qgisinterface (re-exporting deprecated methods)
138+
# disable deprecation warnings for qgisinterface (re-exporting deprecated methods)
139+
IF(MSVC)
140+
SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/src/gui/moc_qgisinterface.cxx PROPERTIES COMPILE_FLAGS "-wd4996")
141+
ELSE(MSVC)
140142
SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/src/gui/moc_qgisinterface.cxx PROPERTIES COMPILE_FLAGS "-w")
141-
ENDIF(NOT MSVC)
143+
ENDIF(MSVC)
142144

143145
#############################################################
144146
# qgis_gui library

0 commit comments

Comments
 (0)