Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Michael Migliore
VTK
Commits
4474933a
Commit
4474933a
authored
Aug 19, 2010
by
David Partyka
Browse files
ENH: Add an option to turn off all NetCDF warnings.
parent
d413a0cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Utilities/vtknetcdf/CMakeLists.txt
View file @
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
}
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment