From 46fff6c83a4d5d46ec2e48e70dbb8bee542c28ea Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 17 Dec 2007 17:05:07 -0500 Subject: STYLE: use IF(NOT ) instead of IF() ELSE() with empty IF() branch Alex --- Modules/CTest.cmake | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 9838bae..7322dbf 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -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 -- cgit v0.12