diff options
| author | George Karpenkov <ekarpenkov@apple.com> | 2017-07-10 18:56:51 +0000 |
|---|---|---|
| committer | George Karpenkov <ekarpenkov@apple.com> | 2017-07-10 18:56:51 +0000 |
| commit | 184e7183c3ddc78521e38007b54d976039e0bc28 (patch) | |
| tree | 5d8fa753544da8c4fe4b11b30382a553b5bf28be /llvm | |
| parent | 7fa20ac847781c1b681c4b3e1d27ddcbfbbff9a4 (diff) | |
| download | bcm5719-llvm-184e7183c3ddc78521e38007b54d976039e0bc28.tar.gz bcm5719-llvm-184e7183c3ddc78521e38007b54d976039e0bc28.zip | |
[docs] Remove obsolete section in CMake documentation.
Differential Revision: https://reviews.llvm.org/D35023
llvm-svn: 307568
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/docs/CMakePrimer.rst | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/llvm/docs/CMakePrimer.rst b/llvm/docs/CMakePrimer.rst index 1e3a09e4d98..c29d627ee62 100644 --- a/llvm/docs/CMakePrimer.rst +++ b/llvm/docs/CMakePrimer.rst @@ -112,33 +112,6 @@ In this example the ``extra_sources`` variable is only defined if you're targeting an Apple platform. For all other targets the ``extra_sources`` will be evaluated as empty before add_executable is given its arguments. -One big "Gotcha" with variable dereferencing is that ``if`` commands implicitly -dereference values. This has some unexpected results. For example: - -.. code-block:: cmake - - if("${SOME_VAR}" STREQUAL "MSVC") - -In this code sample MSVC will be implicitly dereferenced, which will result in -the if command comparing the value of the dereferenced variables ``SOME_VAR`` -and ``MSVC``. A common workaround to this solution is to prepend strings being -compared with an ``x``. - -.. code-block:: cmake - - if("x${SOME_VAR}" STREQUAL "xMSVC") - -This works because while ``MSVC`` is a defined variable, ``xMSVC`` is not. This -pattern is uncommon, but it does occur in LLVM's CMake scripts. - -.. note:: - - Once the LLVM project upgrades its minimum CMake version to 3.1 or later we - can prevent this behavior by setting CMP0054 to new. For more information on - CMake policies please see the cmake-policies manpage or the `cmake-policies - online documentation - <https://cmake.org/cmake/help/v3.4/manual/cmake-policies.7.html>`_. - Lists ----- |

