summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod/HDFMacros.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-04-27 17:10:30 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-04-27 17:10:30 (GMT)
commitc034efb0e2be94627d8c97b488f3b1d18a23ff2f (patch)
treea7ba7522260e5362cebe59f7d2cd3216d4a14012 /config/cmake_ext_mod/HDFMacros.cmake
parent844400155918e931b16b69c59b8b76d4121005ac (diff)
parent68adfb86d056af222ab80c349c56e0bd1d183f09 (diff)
downloadhdf5-c034efb0e2be94627d8c97b488f3b1d18a23ff2f.zip
hdf5-c034efb0e2be94627d8c97b488f3b1d18a23ff2f.tar.gz
hdf5-c034efb0e2be94627d8c97b488f3b1d18a23ff2f.tar.bz2
Merge pull request #2529 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to hdf5_1_10
* commit '68adfb86d056af222ab80c349c56e0bd1d183f09': Merge pull request #2537 in HDFFV/hdf5 from ~DYOUNG/werror:fix-werrors to develop Move ADD_H5_FLAGS macro from *CompilerFlags.cmake files to config/cmake_ext_mod/HDFMacros.cmake for common use. Restrict errors to gcc 4.8 and above. Fix NoFilter build TRILAB-244 separate CXX warnings and errors from C Don't add general warnings flags for unsupported old versions of gcc and g++ (older than gcc/g++ 4.2). Correct gnu-cxxflags to determine warnings flags to be added based on C++ compiler version instead of C compiler version.
Diffstat (limited to 'config/cmake_ext_mod/HDFMacros.cmake')
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index fee6def..5740740 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -429,3 +429,21 @@ macro (HDF_DIR_PATHS package_prefix)
endif ()
endmacro ()
+macro (ADD_H5_FLAGS h5_flag_var infile)
+ file (STRINGS ${infile} TEST_FLAG_STREAM)
+ #message (STATUS "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}")
+ list (LENGTH TEST_FLAG_STREAM len_flag)
+ if (len_flag GREATER 0)
+ math (EXPR _FP_LEN "${len_flag} - 1")
+ foreach (line RANGE 0 ${_FP_LEN})
+ list (GET TEST_FLAG_STREAM ${line} str_flag)
+ string (REGEX REPLACE "^#.*" "" str_flag "${str_flag}")
+ #message (STATUS "str_flag=${str_flag}")
+ if (str_flag)
+ list (APPEND ${h5_flag_var} "${str_flag}")
+ endif ()
+ endforeach ()
+ endif ()
+ #message (STATUS "h5_flag_var=${${h5_flag_var}}")
+endmacro ()
+