BUG: Should test HAVE_<VARIABLE> before repeating test, not just whether <VARIABLE> is set.

This commit is contained in:
Brad King 2003-03-06 10:32:43 -05:00
parent 32ad8ec43e
commit 98d10a42d3
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@
MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1) SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$") IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
SET(MACRO_CHECK_TYPE_SIZE_FLAGS SET(MACRO_CHECK_TYPE_SIZE_FLAGS
"-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}") "-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}")
IF(HAVE_SYS_TYPES_H) IF(HAVE_SYS_TYPES_H)
@ -37,6 +37,6 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n" "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n"
APPEND) APPEND)
ENDIF(HAVE_${VARIABLE}) ENDIF(HAVE_${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS ) SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
ENDMACRO(CHECK_TYPE_SIZE) ENDMACRO(CHECK_TYPE_SIZE)