Imported Upstream version 2.8.11.2
[platform/upstream/cmake.git] / Modules / CMakeAddNewLanguage.txt
1 This file provides a few notes to CMake developers about how to add
2 support for a new language to CMake.  It is also possible to place
3 these files in CMAKE_MODULE_PATH within an outside project to add
4 languages not supported by upstream CMake.  However, this is not
5 a fully supported use case.
6
7 The implementation behind the scenes of project/enable_language,
8 including the compiler/platform modules, is an *internal* API that
9 does not make any compatibility guarantees.  It is not covered in the
10 official reference documentation that is versioned with the source code.
11 Maintainers of external language support are responsible for porting
12 it to each version of CMake as upstream changes are made.  Since
13 the API is internal we will not necessarily include notice of any
14 changes in release notes.
15
16
17 CMakeDetermine(LANG)Compiler.cmake  -> this should find the compiler for LANG and configure CMake(LANG)Compiler.cmake.in
18
19 CMake(LANG)Compiler.cmake.in  -> used by CMakeDetermine(LANG)Compiler.cmake
20     This file is used to store compiler information and is copied down into try
21     compile directories so that try compiles do not need to re-determine and test the LANG
22
23 CMakeTest(LANG)Compiler.cmake -> test the compiler and set:
24     SET(CMAKE_(LANG)_COMPILER_WORKS 1 CACHE INTERNAL "")
25
26 CMake(LANG)Information.cmake  -> set up rule variables for LANG :
27    CMAKE_(LANG)_CREATE_SHARED_LIBRARY
28    CMAKE_(LANG)_CREATE_SHARED_MODULE
29    CMAKE_(LANG)_CREATE_STATIC_LIBRARY
30    CMAKE_(LANG)_COMPILE_OBJECT
31    CMAKE_(LANG)_LINK_EXECUTABLE
32
33