summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDFCompilerFlags.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-02-21 21:40:55 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-02-21 21:41:05 (GMT)
commita6706e3a7850aa3095e8c3530417cfdcf7236e96 (patch)
tree3e9decb56f0c0f7b936dc2e411d1245bafbaf8df /config/cmake/HDFCompilerFlags.cmake
parent7daf7d4a0bf63fa811a16306b88ccd1b21b9dc16 (diff)
downloadhdf5-a6706e3a7850aa3095e8c3530417cfdcf7236e96.zip
hdf5-a6706e3a7850aa3095e8c3530417cfdcf7236e96.tar.gz
hdf5-a6706e3a7850aa3095e8c3530417cfdcf7236e96.tar.bz2
Merge changes from develop for CMake and Java
Diffstat (limited to 'config/cmake/HDFCompilerFlags.cmake')
-rw-r--r--config/cmake/HDFCompilerFlags.cmake11
1 files changed, 9 insertions, 2 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 100ada3..17b0854 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -30,8 +30,10 @@ macro (ADD_H5_FLAGS h5_flag_var infile)
#message (STATUS "h5_flag_var=${${h5_flag_var}}")
endmacro ()
-message (STATUS "Warnings Configuration:")
set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}")
+set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}")
+message (STATUS "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}")
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
@@ -176,7 +178,12 @@ if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
# Append more extra warning flags that only gcc 4.5+ know about
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5)
- set (H5_CFLAGS1 "${H5_CFLAGS1} -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants")
+ set (H5_CFLAGS1 "${H5_CFLAGS1} -Wstrict-overflow=5 -Wjump-misses-init")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ set (H5_CFLAGS0 "${H5_CFLAGS0} -Wunsuffixed-float-constants")
+ else ()
+ set (H5_CFLAGS0 "${H5_CFLAGS0} -Wno-unsuffixed-float-constants")
+ endif ()
endif ()
# Append more extra warning flags that only gcc 4.6+ know about