Skip to content

Commit cf1b668

Browse files
committed
Fix bugs in documentation relating to cling based build
1 parent 0e399f1 commit cf1b668

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
@@ -219,7 +219,7 @@ cd .\cling\
219219
git checkout tags/v1.0
220220
cd ..
221221
git clone --depth=1 -b cling-llvm13 https://github.com/root-project/llvm-project.git
222-
$env:ncpus = %NUMBER_OF_PROCESSORS%
222+
$env:ncpus = $([Environment]::ProcessorCount)
223223
$env:PWD_DIR= $PWD.Path
224224
$env:CLING_DIR="$env:PWD_DIR\cling"
225225
mkdir llvm-project\build
@@ -263,9 +263,22 @@ Regardless of whether you are building CppInterOP with Cling or Clang-REPL you w
263263
```bash
264264
export CB_PYTHON_DIR="$PWD/cppyy-backend/python"
265265
export CPPINTEROP_DIR="$CB_PYTHON_DIR/cppyy_backend"
266+
```
267+
268+
If building CppInterOp against clang-repl you will need to define the following
269+
270+
```bash
266271
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"
267272
```
268273

274+
and if building against cling you will need to define the following
275+
276+
```bash
277+
export CLING_DIR="$(pwd)/cling"
278+
export CLING_BUILD_DIR="$(pwd)/cling/build"
279+
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"
280+
```
281+
269282
If on MacOS you will also need the following environment variable defined
270283

271284
```bash
@@ -277,9 +290,22 @@ On Windows you define as follows (assumes you have defined $env:PWD_DIR= $PWD.Pa
277290
```powershell
278291
$env:CB_PYTHON_DIR="$env:PWD_DIR\cppyy-backend\python"
279292
$env:CPPINTEROP_DIR="$env:CB_PYTHON_DIR\cppyy_backend"
293+
```
294+
295+
If building against clang-repl you will have the following defined
296+
297+
```powershell
280298
$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"
281299
```
282300

301+
and if building against cling
302+
303+
```powershell
304+
$env:CLING_DIR="$env:PWD_DIR\cling"
305+
$env:CLING_BUILD_DIR="$env:PWD_DIR\cling\build"
306+
$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;"
307+
```
308+
283309
#### Build CppInterOp
284310

285311
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
@@ -158,7 +158,7 @@ Use the following build instructions to build on Windows
158158
git checkout tags/v1.0
159159
cd ..
160160
git clone --depth=1 -b cling-llvm13 https://github.com/root-project/llvm-project.git
161-
$env:ncpus = %NUMBER_OF_PROCESSORS%
161+
$env:ncpus = $([Environment]::ProcessorCount)
162162
$env:PWD_DIR= $PWD.Path
163163
$env:CLING_DIR="$env:PWD_DIR\cling"
164164
mkdir llvm-project\build
@@ -209,8 +209,21 @@ define as follows
209209
210210
export CB_PYTHON_DIR="$PWD/cppyy-backend/python"
211211
export CPPINTEROP_DIR="$CB_PYTHON_DIR/cppyy_backend"
212+
213+
If building CppInterOp against clang-repl you will need to define the following
214+
215+
.. code:: bash
216+
212217
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"
213218
219+
and if building against cling you will need to define the following
220+
221+
.. code:: bash
222+
223+
export CLING_DIR="$(pwd)/cling"
224+
export CLING_BUILD_DIR="$(pwd)/cling/build"
225+
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"
226+
214227
If on MacOS you will also need the following environment variable defined
215228

216229
.. code:: bash
@@ -224,8 +237,21 @@ $PWD.Path )
224237
225238
$env:CB_PYTHON_DIR="$env:PWD_DIR\cppyy-backend\python"
226239
$env:CPPINTEROP_DIR="$env:CB_PYTHON_DIR\cppyy_backend"
240+
241+
If building against clang-repl you will have the following defined
242+
243+
.. code:: powershell
244+
227245
$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"
228246
247+
and if building against cling
248+
249+
.. code:: powershell
250+
251+
$env:CLING_DIR="$env:PWD_DIR\cling"
252+
$env:CLING_BUILD_DIR="$env:PWD_DIR\cling\build"
253+
$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;"
254+
229255
******************
230256
Build CppInterOp
231257
******************

docs/InstallationAndUsage.rst

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Use the following build instructions to build on Windows
158158
git checkout tags/v1.0
159159
cd ..
160160
git clone --depth=1 -b cling-llvm13 https://github.com/root-project/llvm-project.git
161-
$env:ncpus = %NUMBER_OF_PROCESSORS%
161+
$env:ncpus = $([Environment]::ProcessorCount)
162162
$env:PWD_DIR= $PWD.Path
163163
$env:CLING_DIR="$env:PWD_DIR\cling"
164164
mkdir llvm-project\build
@@ -209,8 +209,21 @@ define as follows
209209
210210
export CB_PYTHON_DIR="$PWD/cppyy-backend/python"
211211
export CPPINTEROP_DIR="$CB_PYTHON_DIR/cppyy_backend"
212+
213+
If building CppInterOp against clang-repl you will need to define the following
214+
215+
.. code:: bash
216+
212217
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"
213218
219+
and if building against cling you will need to define the following
220+
221+
.. code:: bash
222+
223+
export CLING_DIR="$(pwd)/cling"
224+
export CLING_BUILD_DIR="$(pwd)/cling/build"
225+
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"
226+
214227
If on MacOS you will also need the following environment variable defined
215228

216229
.. code:: bash
@@ -224,8 +237,23 @@ $PWD.Path )
224237
225238
$env:CB_PYTHON_DIR="$env:PWD_DIR\cppyy-backend\python"
226239
$env:CPPINTEROP_DIR="$env:CB_PYTHON_DIR\cppyy_backend"
240+
241+
242+
If building against clang-repl you will have the following defined
243+
244+
.. code:: powershell
245+
227246
$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"
228247
248+
and if building against cling
249+
250+
.. code:: powershell
251+
252+
$env:CLING_DIR="$env:PWD_DIR\cling"
253+
$env:CLING_BUILD_DIR="$env:PWD_DIR\cling\build"
254+
$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;"
255+
256+
229257
******************
230258
Build CppInterOp
231259
******************

0 commit comments

Comments
 (0)