[CMake] EXIT() or RETURN() commands

Filipe Sousa filipe at ipb.pt
Thu Jun 15 06:44:18 EDT 2006


Hi,

I have some FindFoo.cmake scripts that uses big IF commands:

FIND_PROGRAM(FOO_EXEC ...)
IF(FOO_EXEC)
  # a lot of code
ENDIF()

With a RETURN or EXIT command I could remove some nested code

FIND_PROGRAM(FOO_EXEC ...)
IF(NOT FOO_EXEC)
  RETURN() or EXIT()
ENDIF()
# a lot of code

What do you think?

-- 
Filipe Sousa

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060615/4fcfe142/attachment.pgp


More information about the CMake mailing list