mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
Tutorial: Make code snippets linkable
Extend the change from commit 9e5bbb69ea (Tutorial: Add captions for
code blocks, 2021-06-11) to also add a Sphinx named target to code
blocks. Name each target after the change the code block makes.
This commit is contained in:
@@ -39,6 +39,7 @@ So the following code:
|
||||
|
||||
.. literalinclude:: Step10/CMakeLists.txt
|
||||
:caption: CMakeLists.txt
|
||||
:name: CMakeLists.txt-CXX_STANDARD-variable-remove
|
||||
:language: cmake
|
||||
:start-after: project(Tutorial VERSION 1.0)
|
||||
:end-before: # control where the static and shared libraries are built so that on windows
|
||||
@@ -47,6 +48,7 @@ Would be replaced with:
|
||||
|
||||
.. literalinclude:: Step11/CMakeLists.txt
|
||||
:caption: CMakeLists.txt
|
||||
:name: CMakeLists.txt-cxx_std-feature
|
||||
:language: cmake
|
||||
:start-after: project(Tutorial VERSION 1.0)
|
||||
:end-before: # add compiler warning flags just when building this project via
|
||||
@@ -59,6 +61,7 @@ of compiler ids as seen below:
|
||||
|
||||
.. literalinclude:: Step11/CMakeLists.txt
|
||||
:caption: CMakeLists.txt
|
||||
:name: CMakeLists.txt-target_compile_options-genex
|
||||
:language: cmake
|
||||
:start-after: # the BUILD_INTERFACE genex
|
||||
:end-before: # control where the static and shared libraries are built so that on windows
|
||||
|
||||
Reference in New Issue
Block a user