diff options
| author | Brad King <brad.king@kitware.com> | 2022-06-02 13:20:52 (GMT) |
|---|---|---|
| committer | Kitware Robot <kwrobot@kitware.com> | 2022-06-02 13:21:05 (GMT) |
| commit | 84fe677eaed822a5ff86a9ae32cac0c1a5d788c4 (patch) | |
| tree | 2745fa69ace38875fcddc451e503d18be0a9ca0b /Help/guide/tutorial/Adding System Introspection.rst | |
| parent | 18be0f926789ad47d70e54e57f34b2ee4f297307 (diff) | |
| parent | 5c84eca2108c8b47a74391c732710c67e23adfa3 (diff) | |
| download | CMake-84fe677eaed822a5ff86a9ae32cac0c1a5d788c4.zip CMake-84fe677eaed822a5ff86a9ae32cac0c1a5d788c4.tar.gz CMake-84fe677eaed822a5ff86a9ae32cac0c1a5d788c4.tar.bz2 | |
Merge topic 'tutorial-cmath' into release-3.23
5c84eca210 Tutorial: Simplify logic checking for cmath functions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7314
Diffstat (limited to 'Help/guide/tutorial/Adding System Introspection.rst')
| -rw-r--r-- | Help/guide/tutorial/Adding System Introspection.rst | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Help/guide/tutorial/Adding System Introspection.rst b/Help/guide/tutorial/Adding System Introspection.rst index e149110..8db0cb8 100644 --- a/Help/guide/tutorial/Adding System Introspection.rst +++ b/Help/guide/tutorial/Adding System Introspection.rst @@ -9,17 +9,15 @@ tutorial assume that they are not common. If the platform has ``log`` and ``exp`` then we will use them to compute the square root in the ``mysqrt`` function. We first test for the availability of -these functions using the :module:`CheckSymbolExists` module in -``MathFunctions/CMakeLists.txt``. On some platforms, we will need to link to -the ``m`` library. If ``log`` and ``exp`` are not initially found, require the -``m`` library and try again. +these functions using the :module:`CheckCXXSourceCompiles` module in +``MathFunctions/CMakeLists.txt``. Add the checks for ``log`` and ``exp`` to ``MathFunctions/CMakeLists.txt``, after the call to :command:`target_include_directories`: .. literalinclude:: Step6/MathFunctions/CMakeLists.txt :caption: MathFunctions/CMakeLists.txt - :name: MathFunctions/CMakeLists.txt-check_symbol_exists + :name: MathFunctions/CMakeLists.txt-check_cxx_source_compiles :language: cmake :start-after: # to find MathFunctions.h, while we don't. :end-before: # add compile definitions |
