Skip to content

Commit 6c6f94a

Browse files
committed
Prefix the interpreter cmake option
1 parent be5141c commit 6c6f94a

18 files changed

+86
-86
lines changed

.github/workflows/MacOS-arm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ jobs:
396396
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
397397
if [[ "${cling_on}" == "ON" ]]; then
398398
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
399-
-DUSE_CLING=ON \
400-
-DUSE_REPL=OFF \
399+
-DCPPINTEROP_USE_CLING=ON \
400+
-DCPPINTEROP_USE_REPL=OFF \
401401
-DCPPINTEROP_INCLUDE_DOCS=${{ matrix.documentation }} \
402402
-DCling_DIR=$LLVM_BUILD_DIR/tools/cling \
403403
-DLLVM_DIR=$LLVM_BUILD_DIR/lib/cmake/llvm \

.github/workflows/MacOS.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ jobs:
367367
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
368368
if [[ "${cling_on}" == "ON" ]]; then
369369
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
370-
-DUSE_CLING=ON \
371-
-DUSE_REPL=OFF \
370+
-DCPPINTEROP_USE_CLING=ON \
371+
-DCPPINTEROP_USE_REPL=OFF \
372372
-DCPPINTEROP_INCLUDE_DOCS=${{ matrix.documentation }} \
373373
-DCling_DIR=$LLVM_BUILD_DIR/tools/cling \
374374
-DLLVM_DIR=$LLVM_BUILD_DIR/lib/cmake/llvm \

.github/workflows/Ubuntu-arm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ jobs:
449449
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
450450
if [[ "${cling_on}" == "ON" ]]; then
451451
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
452-
-DUSE_CLING=ON \
453-
-DUSE_REPL=OFF \
452+
-DCPPINTEROP_USE_CLING=ON \
453+
-DCPPINTEROP_USE_REPL=OFF \
454454
-DCPPINTEROP_INCLUDE_DOCS=${{ matrix.documentation }} \
455455
-DCling_DIR=$LLVM_BUILD_DIR/tools/cling \
456456
-DLLVM_DIR=$LLVM_BUILD_DIR/lib/cmake/llvm \

.github/workflows/Ubuntu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ jobs:
457457
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
458458
if [[ "${cling_on}" == "ON" ]]; then
459459
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
460-
-DUSE_CLING=ON \
461-
-DUSE_REPL=OFF \
460+
-DCPPINTEROP_USE_CLING=ON \
461+
-DCPPINTEROP_USE_REPL=OFF \
462462
-DCPPINTEROP_INCLUDE_DOCS=${{ matrix.documentation }} \
463463
-DCling_DIR=$LLVM_BUILD_DIR/tools/cling \
464464
-DLLVM_DIR=$LLVM_BUILD_DIR/lib/cmake/llvm \

.github/workflows/Windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ jobs:
357357
if ( "${{ matrix.cling }}" -imatch "On" )
358358
{
359359
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
360-
-DUSE_CLING=ON `
361-
-DUSE_REPL=OFF `
360+
-DCPPINTEROP_USE_CLING=ON `
361+
-DCPPINTEROP_USE_REPL=OFF `
362362
-DCling_DIR="$env:LLVM_BUILD_DIR\tools\cling" `
363363
-DLLVM_DIR="$env:LLVM_BUILD_DIR" `
364364
-DLLVM_ENABLE_WERROR=On `

.github/workflows/deploy-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ jobs:
119119
120120
if [[ "${cling_on}" == "ON" ]]; then
121121
emcmake cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
122-
-DUSE_CLING=ON \
123-
-DUSE_REPL=OFF \
122+
-DCPPINTEROP_USE_CLING=ON \
123+
-DCPPINTEROP_USE_REPL=OFF \
124124
-DCMAKE_PREFIX_PATH=$PREFIX \
125125
-DCling_DIR=$LLVM_BUILD_DIR/tools/cling \
126126
-DLLVM_DIR=$LLVM_BUILD_DIR/lib/cmake/llvm \

.github/workflows/emscripten.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,8 @@ jobs:
575575
export CPPINTEROP_BUILD_DIR=$PWD
576576
if [[ "${cling_on}" == "ON" ]]; then
577577
emcmake cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
578-
-DUSE_CLING=ON \
579-
-DUSE_REPL=OFF \
578+
-DCPPINTEROP_USE_CLING=ON \
579+
-DCPPINTEROP_USE_REPL=OFF \
580580
-DCMAKE_PREFIX_PATH=$PREFIX \
581581
-DCling_DIR=$LLVM_BUILD_DIR/tools/cling \
582582
-DLLVM_DIR=$LLVM_BUILD_DIR/lib/cmake/llvm \

CMakeLists.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
5757
enable_language(CXX)
5858
set(CMAKE_CXX_EXTENSIONS NO)
5959
include(GNUInstallDirs)
60-
option(USE_CLING "Use Cling as backend" OFF)
61-
option(USE_REPL "Use clang-repl as backend" ON)
60+
option(CPPINTEROP_USE_CLING "Use Cling as backend" OFF)
61+
option(CPPINTEROP_USE_REPL "Use clang-repl as backend" ON)
6262

63-
if (USE_CLING AND USE_REPL)
64-
message(FATAL_ERROR "We can only use Cling (USE_CLING=On) or Repl (USE_REPL=On), but not both of them.")
63+
if (CPPINTEROP_USE_CLING AND CPPINTEROP_USE_REPL)
64+
message(FATAL_ERROR "We can only use Cling (CPPINTEROP_USE_CLING=On) or Repl (CPPINTEROP_USE_REPL=On), but not both of them.")
6565
endif()
6666

6767
## Define supported version of clang and llvm
@@ -102,12 +102,12 @@ include(GNUInstallDirs)
102102

103103
## Find supported LLVM
104104

105-
if (USE_CLING)
106-
message(STATUS "Mode USE_CLING = ON")
105+
if (CPPINTEROP_USE_CLING)
106+
message(STATUS "Mode CPPINTEROP_USE_CLING = ON")
107107
find_package(LLVM REQUIRED CONFIG ${llvm_search_hints} NO_DEFAULT_PATH)
108108
find_package(Clang REQUIRED CONFIG ${clang_search_hints} NO_DEFAULT_PATH)
109109
find_package(Cling REQUIRED CONFIG ${cling_search_hints} NO_DEFAULT_PATH)
110-
endif(USE_CLING)
110+
endif(CPPINTEROP_USE_CLING)
111111

112112
if (LLVM_FOUND)
113113
if (LLVM_PACKAGE_VERSION VERSION_LESS LLVM_MIN_SUPPORTED OR LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL LLVM_VERSION_UPPER_BOUND)
@@ -248,7 +248,7 @@ endif()
248248

249249
## Find supported Cling
250250

251-
if (USE_CLING)
251+
if (CPPINTEROP_USE_CLING)
252252
if (NOT Cling_FOUND AND DEFINED Cling_DIR)
253253
find_package(Cling REQUIRED CONFIG ${cling_extra_hints} NO_DEFAULT_PATH)
254254
endif()
@@ -292,24 +292,24 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
292292
# In rare cases we might want to have clang installed in a different place
293293
# than llvm and the header files should be found first (even though the
294294
# LLVM_INCLUDE_DIRS) contain clang headers, too.
295-
if (USE_CLING)
296-
add_definitions(-DUSE_CLING)
295+
if (CPPINTEROP_USE_CLING)
296+
add_definitions(-DCPPINTEROP_USE_CLING)
297297
include_directories(SYSTEM ${CLING_INCLUDE_DIRS})
298298
else()
299-
if (NOT USE_REPL)
300-
message(FATAL_ERROR "We need either USE_CLING or USE_REPL")
299+
if (NOT CPPINTEROP_USE_REPL)
300+
message(FATAL_ERROR "We need either CPPINTEROP_USE_CLING or CPPINTEROP_USE_REPL")
301301
endif()
302-
add_definitions(-DUSE_REPL)
302+
add_definitions(-DCPPINTEROP_USE_REPL)
303303

304-
endif(USE_CLING)
304+
endif(CPPINTEROP_USE_CLING)
305305
include_directories(SYSTEM ${CLANG_INCLUDE_DIRS})
306306
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
307307
separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS})
308308
add_definitions(${LLVM_DEFINITIONS_LIST})
309309

310-
if (USE_CLING)
310+
if (CPPINTEROP_USE_CLING)
311311
message(STATUS "CLING_INCLUDE_DIRS: ${CLING_INCLUDE_DIRS}")
312-
endif(USE_CLING)
312+
endif(CPPINTEROP_USE_CLING)
313313
message(STATUS "CLANG_INCLUDE_DIRS: ${CLANG_INCLUDE_DIRS}")
314314
message(STATUS "LLVM_INCLUDE_DIRS: ${LLVM_INCLUDE_DIRS}")
315315
message(STATUS "LLVM_DEFINITIONS_LIST: ${LLVM_DEFINITIONS_LIST}")

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,14 @@ cmake --build . --target install --parallel $env:ncpus
329329
on Windows. If alternatively you would like to install CppInterOp with Cling then execute the following commands on Linux and MacOS
330330

331331
```bash
332-
cmake -DBUILD_SHARED_LIBS=ON -DUSE_CLING=ON -DUSE_REPL=Off -DCling_DIR=$LLVM_DIR/build/tools/cling -DLLVM_DIR=$LLVM_DIR/build/lib/cmake/llvm -DClang_DIR=$LLVM_DIR/build/lib/cmake/clang -DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR ..
332+
cmake -DBUILD_SHARED_LIBS=ON -DCPPINTEROP_USE_CLING=ON -DCPPINTEROP_USE_REPL=Off -DCling_DIR=$LLVM_DIR/build/tools/cling -DLLVM_DIR=$LLVM_DIR/build/lib/cmake/llvm -DClang_DIR=$LLVM_DIR/build/lib/cmake/clang -DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR ..
333333
cmake --build . --target install --parallel $(nproc --all)
334334
```
335335

336336
and
337337

338338
```powershell
339-
cmake -DUSE_CLING=ON -DUSE_REPL=Off -DCling_DIR=$env:LLVM_DIR\build\tools\cling -DLLVM_DIR=$env:LLVM_DIR\build\lib\cmake\llvm -DClang_DIR=$env:LLVM_DIR\build\lib\cmake\clang -DCMAKE_INSTALL_PREFIX=$env:CPPINTEROP_DIR ..
339+
cmake -DCPPINTEROP_USE_CLING=ON -DCPPINTEROP_USE_REPL=Off -DCling_DIR=$env:LLVM_DIR\build\tools\cling -DLLVM_DIR=$env:LLVM_DIR\build\lib\cmake\llvm -DClang_DIR=$env:LLVM_DIR\build\lib\cmake\clang -DCMAKE_INSTALL_PREFIX=$env:CPPINTEROP_DIR ..
340340
cmake --build . --target install --parallel $env:ncpus
341341
```
342342

docs/DevelopersDocumentation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,14 +270,14 @@ then execute the following commands on Linux and MacOS
270270

271271
.. code:: bash
272272
273-
cmake -DBUILD_SHARED_LIBS=ON -DUSE_CLING=ON -DUSE_REPL=Off -DCling_DIR=$LLVM_DIR/build/tools/cling -DLLVM_DIR=$LLVM_DIR/build/lib/cmake/llvm -DClang_DIR=$LLVM_DIR/build/lib/cmake/clang -DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR ..
273+
cmake -DBUILD_SHARED_LIBS=ON -DCPPINTEROP_USE_CLING=ON -DCPPINTEROP_USE_REPL=Off -DCling_DIR=$LLVM_DIR/build/tools/cling -DLLVM_DIR=$LLVM_DIR/build/lib/cmake/llvm -DClang_DIR=$LLVM_DIR/build/lib/cmake/clang -DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR ..
274274
cmake --build . --target install --parallel $(nproc --all)
275275
276276
and
277277

278278
.. code:: powershell
279279
280-
cmake -DUSE_CLING=ON -DUSE_REPL=Off -DCling_DIR=$env:LLVM_DIR\build\tools\cling -DLLVM_DIR=$env:LLVM_DIR\build\lib\cmake\llvm -DClang_DIR=$env:LLVM_DIR\build\lib\cmake\clang -DCMAKE_INSTALL_PREFIX=$env:CPPINTEROP_DIR ..
280+
cmake -DCPPINTEROP_USE_CLING=ON -DCPPINTEROP_USE_REPL=Off -DCling_DIR=$env:LLVM_DIR\build\tools\cling -DLLVM_DIR=$env:LLVM_DIR\build\lib\cmake\llvm -DClang_DIR=$env:LLVM_DIR\build\lib\cmake\clang -DCMAKE_INSTALL_PREFIX=$env:CPPINTEROP_DIR ..
281281
cmake --build . --target install --parallel $env:ncpus
282282
283283
********************

0 commit comments

Comments
 (0)