enable_language.rst 775 B

12345678910111213141516171819202122
  1. enable_language
  2. ---------------
  3. Enable a language (CXX/C/Fortran/etc)
  4. ::
  5. enable_language(<lang> [OPTIONAL] )
  6. This command enables support for the named language in CMake. This is
  7. the same as the project command but does not create any of the extra
  8. variables that are created by the project command. Example languages
  9. are CXX, C, Fortran.
  10. This command must be called in file scope, not in a function call.
  11. Furthermore, it must be called in the highest directory common to all
  12. targets using the named language directly for compiling sources or
  13. indirectly through link dependencies. It is simplest to enable all
  14. needed languages in the top-level directory of a project.
  15. The ``OPTIONAL`` keyword is a placeholder for future implementation and
  16. does not currently work.