summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-01-12 18:41:50 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-01-12 18:41:50 (GMT)
commit5d09c3d28d4d2502fbab38a921278ce5915b2478 (patch)
tree1ee4dc0f27b5d2ee3bead80663cc2461015c94b6 /config/cmake
parentcdd4df51272b18d28b5b8f60799d140de3ffadf1 (diff)
downloadhdf5-5d09c3d28d4d2502fbab38a921278ce5915b2478.zip
hdf5-5d09c3d28d4d2502fbab38a921278ce5915b2478.tar.gz
hdf5-5d09c3d28d4d2502fbab38a921278ce5915b2478.tar.bz2
Move Windows level 4 warnings to developer option
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/HDFCompilerFlags.cmake15
1 files changed, 11 insertions, 4 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index a56c087..36923f0 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -174,10 +174,17 @@ endif ()
option (HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF)
if (HDF5_ENABLE_ALL_WARNINGS)
if (MSVC)
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall")
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall /wd4668")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall /wd4668")
+ else ()
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
+ endif ()
else ()
if (CMAKE_COMPILER_IS_GNUCC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic ${H5_CFLAGS1} ${H5_CFLAGS2}")