Move macro ADD_H5_CFLAGS to cmake_ext_mod/HDFMacros.cmake and remove

duplicate versions.
This commit is contained in:
Larry Knox
2020-04-22 10:42:32 -05:00
parent 5a010aace9
commit d965e53cc0
4 changed files with 18 additions and 54 deletions

View File

@@ -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 ()