diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2020-04-27 16:14:31 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2020-04-27 16:14:31 (GMT) |
commit | 295d7ec69bdd1bb6f662cee1fe8ff70fe50f55c5 (patch) | |
tree | 354d7b2edc2b8de79d0024f37d9d255eea50d61a /config/cmake_ext_mod | |
parent | 7491ba03f9a6bc4d45bd50b2de9806d853da81eb (diff) | |
download | hdf5-295d7ec69bdd1bb6f662cee1fe8ff70fe50f55c5.zip hdf5-295d7ec69bdd1bb6f662cee1fe8ff70fe50f55c5.tar.gz hdf5-295d7ec69bdd1bb6f662cee1fe8ff70fe50f55c5.tar.bz2 |
Move ADD_H5_FLAGS macro from *CompilerFlags.cmake files to
config/cmake_ext_mod/HDFMacros.cmake for common use.
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r-- | config/cmake_ext_mod/HDFMacros.cmake | 18 |
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 () + |