File tree 1 file changed +6
-13
lines changed
1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -304,24 +304,17 @@ IF (PEDANTIC)
304
304
ADD_DEFINITIONS ( /wd4610 ) # user defined constructor required (sqlite3_index_info)
305
305
ADD_DEFINITIONS ( /wd4706 ) # assignment within conditional expression (pal)
306
306
ELSE (MSVC )
307
- IF (APPLE )
308
- # add warnings via flags instead of definitions on Mac (otherwise -Wall can not be overridden per language)
309
- SET (_warnings "-Wall -Wextra -Wno-long-long -Wformat-security -Wno-strict-aliasing" )
310
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_warnings} " )
311
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_warnings} " )
312
- ELSE (APPLE )
313
- ADD_DEFINITIONS ( -Wall -Wextra -Wno-long-long -Wformat-security -Wno-strict-aliasing )
314
- ENDIF (APPLE )
307
+ # add warnings via flags (not as definitions as on Mac -Wall can not be overridden per language )
308
+ SET (_warnings "-Wall -Wextra -Wno-long-long -Wformat-security -Wno-strict-aliasing" )
309
+ SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_warnings} " )
310
+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_warnings} " )
311
+
315
312
# Qt produces lots of warnings with strict aliasing (as of Qt 4.4.0 & GCC 4.3)
316
313
# There are redundant declarations in Qt and GDAL
317
314
# ADD_DEFINITIONS( -fstrict-aliasing -Wstrict-aliasing=1 -Wredundant-decls )
318
315
319
316
IF ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" )
320
- IF (APPLE )
321
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage" )
322
- ELSE (APPLE )
323
- ADD_DEFINITIONS (-Wno-return-type -c-linkage) # used in plugins and providers
324
- ENDIF (APPLE )
317
+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage" )
325
318
ENDIF ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" )
326
319
ENDIF (MSVC )
327
320
You can’t perform that action at this time.
0 commit comments