STYLE: use IF(NOT ) instead of IF() ELSE() with empty IF() branch
Alex
This commit is contained in:
parent
d1f4fa6bb7
commit
46fff6c83a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue