Skip to content

Commit 687585e

Browse files
committed
Docs: Remove all references to long-unused LitRe tool. Also incidentally removes redundant/duplicate check for sphinx-build binary.
1 parent 02603ca commit 687585e

32 files changed

+0
-174
lines changed

docs/ABI/Mangling.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
:orphan:
22

3-
.. @raise litre.TestsAreMissing
43
.. _ABI:
54

65
.. highlight:: none

docs/ABI/TypeLayout.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
:orphan:
22

3-
.. @raise litre.TestsAreMissing
43
.. _ABI:
54

65
.. highlight:: none

docs/ABI/TypeMetadata.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
:orphan:
22

3-
.. @raise litre.TestsAreMissing
43
.. _ABI:
54

65
.. highlight:: none

docs/CMakeLists.txt

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -24,112 +24,6 @@ else()
2424
message(WARNING "Unable to find sphinx-build program. Not building docs")
2525
endif()
2626

27-
## Example testing
28-
29-
find_program(LITRE_EXECUTABLE
30-
NAMES litre
31-
DOC "LitRe literate programming tool for docutils")
32-
33-
find_program(SPHINX_EXECUTABLE
34-
NAMES sphinx-build
35-
HINTS $ENV{SPHINX_DIR}
36-
PATH_SUFFIXES bin
37-
DOC "Sphinx documentation generator")
38-
39-
if(LITRE_EXECUTABLE)
40-
# Find all the .rst files
41-
file(GLOB_RECURSE rst_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.rst)
42-
set(subdir_CMakeLists)
43-
44-
foreach(rst ${rst_files})
45-
# Prepare a testing directory containing a CMakeLists.txt
46-
# and example files extracted from the .rst
47-
set(test_dir "litre-tests/${rst}.litre-tests")
48-
49-
add_custom_command(
50-
OUTPUT
51-
${test_dir}/CMakeLists.txt
52-
COMMAND
53-
${LITRE_EXECUTABLE}
54-
--default_compiler=${CMAKE_BINARY_DIR}/bin/swift
55-
"--dump_dir=${test_dir}"
56-
--traceback
57-
--report=severe # suppress most .rst errors. We have lots of them.
58-
${CMAKE_CURRENT_SOURCE_DIR}/${rst}
59-
DEPENDS
60-
${CMAKE_CURRENT_SOURCE_DIR}/${rst}
61-
COMMENT
62-
"Generating/Updating LitRe tests for ${rst}"
63-
VERBATIM
64-
)
65-
66-
list(APPEND subdir_CMakeLists ${test_dir}/CMakeLists.txt)
67-
endforeach()
68-
69-
# Create a top-level CMakeLists.txt in a temporary file
70-
add_custom_command(
71-
OUTPUT
72-
litre-top-CMakeLists.cmake
73-
COMMAND
74-
${CMAKE_COMMAND} -DOUTPUT=litre-top-CMakeLists.cmake
75-
-DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
76-
-P ${CMAKE_CURRENT_SOURCE_DIR}/GenerateTopLevelLitreCMakeLists.cmake
77-
${rst_files}
78-
DEPENDS
79-
${rst_files}
80-
COMMENT
81-
"Generating top-level LitRe CMakeLists.txt content"
82-
VERBATIM
83-
)
84-
85-
# Only update the real top-level CMakeLists.txt if something changed
86-
add_custom_command(
87-
OUTPUT
88-
"litre-tests/CMakeLists.txt"
89-
COMMAND
90-
"${CMAKE_COMMAND}" "-E" "copy_if_different"
91-
"litre-top-CMakeLists.cmake" "litre-tests/CMakeLists.txt"
92-
DEPENDS
93-
"litre-top-CMakeLists.cmake"
94-
COMMENT
95-
"Updating top-level LitRe CMakeLists.txt"
96-
VERBATIM)
97-
98-
# Create a build directory
99-
add_custom_command(
100-
OUTPUT "litre-tests/build"
101-
COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "litre-tests/build")
102-
103-
# Run CMake itself to configure/build the tests
104-
add_custom_command(
105-
OUTPUT
106-
litre-tests/results
107-
COMMAND
108-
${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" "${CMAKE_CURRENT_BINARY_DIR}/litre-tests"
109-
COMMAND
110-
${CMAKE_COMMAND} --build .
111-
COMMAND
112-
${CMAKE_COMMAND} -E touch "${CMAKE_CURRENT_BINARY_DIR}/litre-tests/results"
113-
WORKING_DIRECTORY
114-
litre-tests/build
115-
DEPENDS
116-
${CMAKE_BINARY_DIR}/bin/swift
117-
litre-tests/CMakeLists.txt litre-tests/build ${subdir_CMakeLists}
118-
COMMENT
119-
"Running LitRe tests"
120-
VERBATIM
121-
)
122-
123-
# Add a target so these tests show up in the Xcode project.
124-
add_custom_target(
125-
LiterateTests SOURCES ${rst_files}
126-
DEPENDS litre-tests/results
127-
)
128-
set_target_properties(LiterateTests PROPERTIES FOLDER "Tests")
129-
else()
130-
message(WARNING "LitRe not found; code examples won't be tested.")
131-
endif()
132-
13327
if (LLVM_ENABLE_DOXYGEN)
13428
if (DOXYGEN_FOUND)
13529
set(abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})

docs/DependencyAnalysis.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
:orphan:
22

3-
.. @raise litre.TestsAreMissing
4-
53
===================
64
Dependency Analysis
75
===================

docs/GenerateTopLevelLitreCMakeLists.cmake

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/Lexicon.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
.. title:: Lexicon
44
.. default-role:: term
55

6-
.. @raise litre.TestsAreMissing
7-
86
This file defines several terms used by the Swift compiler and standard library
97
source code, tests, and commit messages. See also the `LLVM lexicon`_.
108

docs/Literals.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
:orphan:
22

3-
.. @raise litre.TestsAreMissing
4-
53
Literals
64
========
75

docs/LitreTemplate.cmake

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/LogicalObjects.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. @raise litre.TestsAreMissing
2-
31
Logical Objects
42
===============
53

0 commit comments

Comments
 (0)