return.rst 633 B

123456789101112131415161718
  1. return
  2. ------
  3. Return from a file, directory or function.
  4. ::
  5. return()
  6. Returns from a file, directory or function. When this command is
  7. encountered in an included file (via include() or find_package()), it
  8. causes processing of the current file to stop and control is returned
  9. to the including file. If it is encountered in a file which is not
  10. included by another file, e.g. a CMakeLists.txt, control is returned
  11. to the parent directory if there is one. If return is called in a
  12. function, control is returned to the caller of the function. Note
  13. that a macro is not a function and does not handle return like a
  14. function does.