Commit cdee8405 authored by Dave Partyka's avatar Dave Partyka Committed by Kitware Robot
Browse files

Merge topic 'netcdf4'

4474933a ENH: Add an option to turn off all NetCDF warnings.
parents 2e7011c4 4474933a
......@@ -260,6 +260,28 @@ SET(WORDS_BIGENDIAN ${CMAKE_WORDS_BIGENDIAN})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ncconfig.h.in
${CMAKE_CURRENT_BINARY_DIR}/ncconfig.h @ONLY IMMEDIATE)
#-----------------------------------------------------------------------------
# Option to allow the user to disable compiler warnings
#-----------------------------------------------------------------------------
OPTION (NETCDF_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" ON)
MARK_AS_ADVANCED(NETCDF_DISABLE_COMPILER_WARNINGS)
IF (NETCDF_DISABLE_COMPILER_WARNINGS)
# MSVC uses /w to suppress warnings. It also complains if another
# warning level is given, so remove it.
IF (MSVC)
STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " "
CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w")
# Borland uses -w- to suppress warnings.
ELSEIF (BORLAND)
SET (HDF5_WARNINGS_BLOCKED 1)
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
ELSE ()
# Most compilers use -w to suppress warnings.
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
ENDIF ()
ENDIF (NETCDF_DISABLE_COMPILER_WARNINGS)
ADD_LIBRARY(vtkNetCDF
${netcdf_SRCS})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment