HDFFV-10398 fix detection of repeat checks

This commit is contained in:
Allen Byrne 2018-01-30 16:22:18 -06:00
parent 435fd5afa5
commit b005c5653e
2 changed files with 4 additions and 19 deletions

View File

@ -179,7 +179,7 @@ endif ()
# Macro to determine the various conversion capabilities
#-----------------------------------------------------------------------------
macro (H5ConversionTests TEST msg)
if ("${TEST}" MATCHES "^${TEST}$")
if (NOT DEFINED ${TEST})
# message (STATUS "===> ${TEST}")
TRY_RUN (${TEST}_RUN ${TEST}_COMPILE
${CMAKE_BINARY_DIR}
@ -209,21 +209,6 @@ macro (H5ConversionTests TEST msg)
endif ()
endmacro ()
#-----------------------------------------------------------------------------
# Macro to make some of the conversion tests easier to write/read
#-----------------------------------------------------------------------------
macro (H5MiscConversionTest VAR TEST msg)
if ("${TEST}" MATCHES "^${TEST}$")
if (${VAR})
set (${TEST} 1 CACHE INTERNAL ${msg})
message (STATUS "${msg}... yes")
else ()
set (${TEST} "" CACHE INTERNAL ${msg})
message (STATUS "${msg}... no")
endif ()
endif ()
endmacro ()
#-----------------------------------------------------------------------------
# Check various conversion capabilities
#-----------------------------------------------------------------------------

View File

@ -145,7 +145,7 @@ endif ()
# For other specific tests, use this MACRO.
macro (HDF_FUNCTION_TEST OTHER_TEST)
if ("${HDF_PREFIX}_${OTHER_TEST}" MATCHES "^${HDF_PREFIX}_${OTHER_TEST}$")
if (NOT DEFINED ${HDF_PREFIX}_${OTHER_TEST})
set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
set (OTHER_TEST_ADD_LIBRARIES)
if (CMAKE_REQUIRED_LIBRARIES)
@ -587,7 +587,7 @@ endif ()
# For other CXX specific tests, use this MACRO.
macro (HDF_CXX_FUNCTION_TEST OTHER_TEST)
if ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$")
if (NOT DEFINED ${OTHER_TEST})
set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
set (OTHER_TEST_ADD_LIBRARIES)
if (CMAKE_REQUIRED_LIBRARIES)
@ -656,7 +656,7 @@ endif ()
if (WINDOWS)
if (NOT HDF_NO_IOEO_TEST)
message (STATUS "Checking for InitOnceExecuteOnce:")
if ("${${HDF_PREFIX}_HAVE_IOEO}" MATCHES "^${${HDF_PREFIX}_HAVE_IOEO}$")
if (NOT DEFINED ${${HDF_PREFIX}_HAVE_IOEO})
if (LARGEFILE)
set (CMAKE_REQUIRED_DEFINITIONS
"${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"