STYLE: use IF(NOT ) instead of IF() ELSE() with empty IF() branch

Alex
This commit is contained in:
Alexander Neundorf 2007-12-17 17:05:07 -05:00
parent d1f4fa6bb7
commit 46fff6c83a
1 changed files with 4 additions and 6 deletions

View File

@ -20,17 +20,15 @@ IF(BUILD_TESTING)
ENDMACRO(SET_IF_NOT_SET)
MACRO(SET_IF_SET var val)
IF("${val}" MATCHES "^$")
ELSE("${val}" MATCHES "^$")
IF(NOT "${val}" MATCHES "^$")
SET("${var}" "${val}")
ENDIF("${val}" MATCHES "^$")
ENDIF(NOT "${val}" MATCHES "^$")
ENDMACRO(SET_IF_SET)
MACRO(SET_IF_SET_AND_NOT_SET var val)
IF("${val}" MATCHES "^$")
ELSE("${val}" MATCHES "^$")
IF(NOT "${val}" MATCHES "^$")
SET_IF_NOT_SET("${var}" "${val}")
ENDIF("${val}" MATCHES "^$")
ENDIF(NOT "${val}" MATCHES "^$")
ENDMACRO(SET_IF_SET_AND_NOT_SET)
# Make sure testing is enabled