mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-19 21:50:39 -06:00
Check{,C,CXX,OBJC,OBJCXX,Fortran}SourceCompiles: Update documentation
Changes: - Added intro code blocks showing how to include these modules. - Added examples sections. - Used "command" instead of "macro". - Commands sections added to have a clearer overview of the modules at first encounter. - Reworded commands arguments a bit. - Added a rubric title for variables that affect the checks. - CheckFortranSourceCompiles: Added CMake version when SRC_EXT option was introduced. - Listed CMAKE_TRY_COMPILE_TARGET_TYPE variable in the rubric together with CMAKE_REQUIRED_* variables and added an include RST file for it. - Used lowercase style for check_fortran_source_compiles().
This commit is contained in:
@@ -35,7 +35,7 @@ exercise, complete ``TODO 1`` through ``TODO 5``.
|
||||
|
||||
Start by editing ``MathFunctions/CMakeLists.txt``. Include the
|
||||
:module:`CheckCXXSourceCompiles` module. Then, use
|
||||
``check_cxx_source_compiles`` to determine whether ``log`` and ``exp`` are
|
||||
``check_cxx_source_compiles()`` to determine whether ``log`` and ``exp`` are
|
||||
available from ``cmath``. If they are available, use
|
||||
:command:`target_compile_definitions` to specify ``HAVE_LOG`` and ``HAVE_EXP``
|
||||
as compile definitions.
|
||||
|
||||
6
Help/module/include/CMAKE_TRY_COMPILE_TARGET_TYPE.rst
Normal file
6
Help/module/include/CMAKE_TRY_COMPILE_TARGET_TYPE.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
:variable:`CMAKE_TRY_COMPILE_TARGET_TYPE`
|
||||
Internally, the :command:`try_compile` command is used to perform the
|
||||
check, and this variable controls the type of target it creates. If this
|
||||
variable is set to ``EXECUTABLE`` (the default), the check compiles and
|
||||
links the test source code as an executable program. If set to
|
||||
``STATIC_LIBRARY``, the test source code is compiled but not linked.
|
||||
@@ -191,7 +191,7 @@ Modules
|
||||
meant for a prefix other than :variable:`CMAKE_INSTALL_PREFIX`.
|
||||
|
||||
* The :module:`CheckFortranSourceCompiles` module was added to
|
||||
provide a ``CHECK_Fortran_SOURCE_COMPILES`` macro.
|
||||
provide a ``check_fortran_source_compiles()`` command.
|
||||
|
||||
* The :module:`ExternalData` module learned to tolerate a ``DATA{}``
|
||||
reference to a missing source file with a warning instead of
|
||||
|
||||
@@ -158,8 +158,8 @@ Modules
|
||||
* An :module:`AndroidTestUtilities` module was added to manage transfer
|
||||
of test data to an Android device.
|
||||
|
||||
* The :module:`CheckFortranSourceCompiles` module macro
|
||||
``CHECK_Fortran_SOURCE_COMPILES`` gained a ``SRC_EXT`` option
|
||||
* The :module:`CheckFortranSourceCompiles` module command
|
||||
``check_fortran_source_compiles()`` gained a ``SRC_EXT`` option
|
||||
to specify a custom test Fortran source file extension.
|
||||
|
||||
* The :module:`ExternalProject` module gained ``HTTP_USERNAME`` and
|
||||
|
||||
Reference in New Issue
Block a user