mirror of
https://github.com/Kitware/CMake.git
synced 2025-05-08 22:37:04 +08:00

Where possible this syncs the CS for command names: - check_c_source_compiles() - check_cxx_compiler_flag() - check_cxx_source_compiles() - check_cxx_symbol_exists() - check_include_file_cxx() - check_include_file() - check_include_files() - check_library_exists() - check_source_compiles() - check_struct_has_member() - check_symbol_exists() - check_type_size() - cmake_dependent_option() - cmake_parse_arguments() - feature_summary() - file() - find_package_handle_standard_args() - if(), endif... - install(FILES) - list() - message() - pkg_check_modules() - select_library_configurations() - set_package_info() - test_big_endian()
40 lines
1.7 KiB
Plaintext
40 lines
1.7 KiB
Plaintext
This file provides a few notes to CMake developers about how to add
|
|
support for a new language to CMake. It is also possible to place
|
|
these files in :variable:`CMAKE_MODULE_PATH` within an outside project
|
|
to add languages not supported by upstream CMake. However, this is not
|
|
a fully supported use case.
|
|
|
|
The implementation behind the scenes of project/enable_language,
|
|
including the compiler/platform modules, is an *internal* API that
|
|
does not make any compatibility guarantees. It is not covered in the
|
|
official reference documentation that is versioned with the source code.
|
|
Maintainers of external language support are responsible for porting
|
|
it to each version of CMake as upstream changes are made. Since
|
|
the API is internal we will not necessarily include notice of any
|
|
changes in release notes.
|
|
|
|
|
|
CMakeDetermine(LANG)Compiler.cmake -> this should find the compiler for LANG and configure CMake(LANG)Compiler.cmake.in
|
|
|
|
CMake(LANG)Compiler.cmake.in -> used by CMakeDetermine(LANG)Compiler.cmake
|
|
This file is used to store compiler information and is copied down into try
|
|
compile directories so that try compiles do not need to re-determine and test the LANG
|
|
|
|
CMake(LANG)Information.cmake => set compiler configuration:
|
|
CMAKE_(LANG)_CREATE_SHARED_LIBRARY
|
|
CMAKE_(LANG)_CREATE_SHARED_MODULE
|
|
CMAKE_(LANG)_CREATE_STATIC_LIBRARY
|
|
CMAKE_(LANG)_COMPILE_OBJECT
|
|
CMAKE_(LANG)_LINK_EXECUTABLE
|
|
|
|
CMAKE_(LANG)_USE_LINKER_INFORMATION
|
|
|
|
CMakeTest(LANG)Compiler.cmake -> test the compiler and set:
|
|
set(CMAKE_(LANG)_COMPILER_WORKS 1 CACHE INTERNAL "")
|
|
|
|
|
|
If the variable CMAKE_(LANG)_USE_LINKER_INFORMATION has value TRUE, the file CMake(LANG)LinkerInformation.cmake
|
|
should be defined.
|
|
|
|
CMake(LANG)LinkerInformation.cmake -> set up linker configuration for LANG.
|