Skip to content

Commit 571f78d

Browse files
authored
Fix bugs in documentation relating to cling based build
1 parent 29f2920 commit 571f78d

File tree

3 files changed

+83
-3
lines changed

3 files changed

+83
-3
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ cd .\cling\
225225
git checkout tags/v1.0
226226
cd ..
227227
git clone --depth=1 -b cling-llvm13 https://github.com/root-project/llvm-project.git
228-
$env:ncpus = %NUMBER_OF_PROCESSORS%
228+
$env:ncpus = $([Environment]::ProcessorCount)
229229
$env:PWD_DIR= $PWD.Path
230230
$env:CLING_DIR="$env:PWD_DIR\cling"
231231
mkdir llvm-project\build
@@ -269,9 +269,22 @@ Regardless of whether you are building CppInterOP with Cling or Clang-REPL you w
269269
```bash
270270
export CB_PYTHON_DIR="$PWD/cppyy-backend/python"
271271
export CPPINTEROP_DIR="$CB_PYTHON_DIR/cppyy_backend"
272+
```
273+
274+
If building CppInterOp against clang-repl you will need to define the following
275+
276+
```bash
272277
export CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:${LLVM_DIR}/llvm/include:${LLVM_DIR}/clang/include:${LLVM_DIR}/build/include:${LLVM_DIR}/build/tools/clang/include"
273278
```
274279

280+
and if building against cling you will need to define the following
281+
282+
```bash
283+
export CLING_DIR="$(pwd)/cling"
284+
export CLING_BUILD_DIR="$(pwd)/cling/build"
285+
export CPLUS_INCLUDE_PATH="${CLING_DIR}/tools/cling/include:${CLING_BUILD_DIR}/include:${LLVM_DIR}/llvm/include:${LLVM_DIR}/clang/include:${LLVM_BUILD_DIR}/include:${LLVM_BUILD_DIR}/tools/clang/include:$PWD/include"
286+
```
287+
275288
If on MacOS you will also need the following environment variable defined
276289

277290
```bash
@@ -283,9 +296,22 @@ On Windows you define as follows (assumes you have defined $env:PWD_DIR= $PWD.Pa
283296
```powershell
284297
$env:CB_PYTHON_DIR="$env:PWD_DIR\cppyy-backend\python"
285298
$env:CPPINTEROP_DIR="$env:CB_PYTHON_DIR\cppyy_backend"
299+
```
300+
301+
If building against clang-repl you will have the following defined
302+
303+
```powershell
286304
$env:CPLUS_INCLUDE_PATH="$env:CPLUS_INCLUDE_PATH;$env:LLVM_DIR\llvm\include;$env:LLVM_DIR\clang\include;$env:LLVM_DIR\build\include;$env:LLVM_DIR\build\tools\clang\include"
287305
```
288306

307+
and if building against cling
308+
309+
```powershell
310+
$env:CLING_DIR="$env:PWD_DIR\cling"
311+
$env:CLING_BUILD_DIR="$env:PWD_DIR\cling\build"
312+
$env:CPLUS_INCLUDE_PATH="$env:CLING_DIR\tools\cling\include;$env:CLING_BUILD_DIR\include;$env:LLVM_DIR\llvm\include;$env:LLVM_DIR\clang\include;$env:LLVM_BUILD_DIR\include;$env:LLVM_BUILD_DIR\tools\clang\include;$env:PWD_DIR\include;"
313+
```
314+
289315
#### Build CppInterOp
290316

291317
Now CppInterOp can be installed. On Linux and MacOS execute

docs/DevelopersDocumentation.rst

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Use the following build instructions to build on Windows
164164
git checkout tags/v1.0
165165
cd ..
166166
git clone --depth=1 -b cling-llvm13 https://github.com/root-project/llvm-project.git
167-
$env:ncpus = %NUMBER_OF_PROCESSORS%
167+
$env:ncpus = $([Environment]::ProcessorCount)
168168
$env:PWD_DIR= $PWD.Path
169169
$env:CLING_DIR="$env:PWD_DIR\cling"
170170
mkdir llvm-project\build
@@ -215,8 +215,21 @@ define as follows
215215
216216
export CB_PYTHON_DIR="$PWD/cppyy-backend/python"
217217
export CPPINTEROP_DIR="$CB_PYTHON_DIR/cppyy_backend"
218+
219+
If building CppInterOp against clang-repl you will need to define the following
220+
221+
.. code:: bash
222+
218223
export CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:${LLVM_DIR}/llvm/include:${LLVM_DIR}/clang/include:${LLVM_DIR}/build/include:${LLVM_DIR}/build/tools/clang/include"
219224
225+
and if building against cling you will need to define the following
226+
227+
.. code:: bash
228+
229+
export CLING_DIR="$(pwd)/cling"
230+
export CLING_BUILD_DIR="$(pwd)/cling/build"
231+
export CPLUS_INCLUDE_PATH="${CLING_DIR}/tools/cling/include:${CLING_BUILD_DIR}/include:${LLVM_DIR}/llvm/include:${LLVM_DIR}/clang/include:${LLVM_BUILD_DIR}/include:${LLVM_BUILD_DIR}/tools/clang/include:$PWD/include"
232+
220233
If on MacOS you will also need the following environment variable defined
221234

222235
.. code:: bash
@@ -230,8 +243,21 @@ $PWD.Path )
230243
231244
$env:CB_PYTHON_DIR="$env:PWD_DIR\cppyy-backend\python"
232245
$env:CPPINTEROP_DIR="$env:CB_PYTHON_DIR\cppyy_backend"
246+
247+
If building against clang-repl you will have the following defined
248+
249+
.. code:: powershell
250+
233251
$env:CPLUS_INCLUDE_PATH="$env:CPLUS_INCLUDE_PATH;$env:LLVM_DIR\llvm\include;$env:LLVM_DIR\clang\include;$env:LLVM_DIR\build\include;$env:LLVM_DIR\build\tools\clang\include"
234252
253+
and if building against cling
254+
255+
.. code:: powershell
256+
257+
$env:CLING_DIR="$env:PWD_DIR\cling"
258+
$env:CLING_BUILD_DIR="$env:PWD_DIR\cling\build"
259+
$env:CPLUS_INCLUDE_PATH="$env:CLING_DIR\tools\cling\include;$env:CLING_BUILD_DIR\include;$env:LLVM_DIR\llvm\include;$env:LLVM_DIR\clang\include;$env:LLVM_BUILD_DIR\include;$env:LLVM_BUILD_DIR\tools\clang\include;$env:PWD_DIR\include;"
260+
235261
******************
236262
Build CppInterOp
237263
******************

docs/InstallationAndUsage.rst

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Use the following build instructions to build on Windows
164164
git checkout tags/v1.0
165165
cd ..
166166
git clone --depth=1 -b cling-llvm13 https://github.com/root-project/llvm-project.git
167-
$env:ncpus = %NUMBER_OF_PROCESSORS%
167+
$env:ncpus = $([Environment]::ProcessorCount)
168168
$env:PWD_DIR= $PWD.Path
169169
$env:CLING_DIR="$env:PWD_DIR\cling"
170170
mkdir llvm-project\build
@@ -215,8 +215,21 @@ define as follows
215215
216216
export CB_PYTHON_DIR="$PWD/cppyy-backend/python"
217217
export CPPINTEROP_DIR="$CB_PYTHON_DIR/cppyy_backend"
218+
219+
If building CppInterOp against clang-repl you will need to define the following
220+
221+
.. code:: bash
222+
218223
export CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:${LLVM_DIR}/llvm/include:${LLVM_DIR}/clang/include:${LLVM_DIR}/build/include:${LLVM_DIR}/build/tools/clang/include"
219224
225+
and if building against cling you will need to define the following
226+
227+
.. code:: bash
228+
229+
export CLING_DIR="$(pwd)/cling"
230+
export CLING_BUILD_DIR="$(pwd)/cling/build"
231+
export CPLUS_INCLUDE_PATH="${CLING_DIR}/tools/cling/include:${CLING_BUILD_DIR}/include:${LLVM_DIR}/llvm/include:${LLVM_DIR}/clang/include:${LLVM_BUILD_DIR}/include:${LLVM_BUILD_DIR}/tools/clang/include:$PWD/include"
232+
220233
If on MacOS you will also need the following environment variable defined
221234

222235
.. code:: bash
@@ -230,8 +243,23 @@ $PWD.Path )
230243
231244
$env:CB_PYTHON_DIR="$env:PWD_DIR\cppyy-backend\python"
232245
$env:CPPINTEROP_DIR="$env:CB_PYTHON_DIR\cppyy_backend"
246+
247+
248+
If building against clang-repl you will have the following defined
249+
250+
.. code:: powershell
251+
233252
$env:CPLUS_INCLUDE_PATH="$env:CPLUS_INCLUDE_PATH;$env:LLVM_DIR\llvm\include;$env:LLVM_DIR\clang\include;$env:LLVM_DIR\build\include;$env:LLVM_DIR\build\tools\clang\include"
234253
254+
and if building against cling
255+
256+
.. code:: powershell
257+
258+
$env:CLING_DIR="$env:PWD_DIR\cling"
259+
$env:CLING_BUILD_DIR="$env:PWD_DIR\cling\build"
260+
$env:CPLUS_INCLUDE_PATH="$env:CLING_DIR\tools\cling\include;$env:CLING_BUILD_DIR\include;$env:LLVM_DIR\llvm\include;$env:LLVM_DIR\clang\include;$env:LLVM_BUILD_DIR\include;$env:LLVM_BUILD_DIR\tools\clang\include;$env:PWD_DIR\include;"
261+
262+
235263
******************
236264
Build CppInterOp
237265
******************

0 commit comments

Comments
 (0)