Skip to content

Commit fce2b83

Browse files
authored
Merge branch 'main' into Update-to-llvm-20
2 parents 889f996 + 9c818c5 commit fce2b83

22 files changed

+199
-96
lines changed

.github/workflows/MacOS-arm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ jobs:
409409
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
410410
if [[ "${cling_on}" == "ON" ]]; then
411411
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
412-
-DUSE_CLING=ON \
413-
-DUSE_REPL=OFF \
412+
-DCPPINTEROP_USE_CLING=ON \
413+
-DCPPINTEROP_USE_REPL=OFF \
414414
-DCPPINTEROP_INCLUDE_DOCS=${{ matrix.documentation }} \
415415
-DCling_DIR=$LLVM_BUILD_DIR/tools/cling \
416416
-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
@@ -380,8 +380,8 @@ jobs:
380380
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
381381
if [[ "${cling_on}" == "ON" ]]; then
382382
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
383-
-DUSE_CLING=ON \
384-
-DUSE_REPL=OFF \
383+
-DCPPINTEROP_USE_CLING=ON \
384+
-DCPPINTEROP_USE_REPL=OFF \
385385
-DCPPINTEROP_INCLUDE_DOCS=${{ matrix.documentation }} \
386386
-DCling_DIR=$LLVM_BUILD_DIR/tools/cling \
387387
-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
@@ -475,8 +475,8 @@ jobs:
475475
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
476476
if [[ "${cling_on}" == "ON" ]]; then
477477
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
478-
-DUSE_CLING=ON \
479-
-DUSE_REPL=OFF \
478+
-DCPPINTEROP_USE_CLING=ON \
479+
-DCPPINTEROP_USE_REPL=OFF \
480480
-DCPPINTEROP_INCLUDE_DOCS=${{ matrix.documentation }} \
481481
-DCling_DIR=$LLVM_BUILD_DIR/tools/cling \
482482
-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
@@ -483,8 +483,8 @@ jobs:
483483
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
484484
if [[ "${cling_on}" == "ON" ]]; then
485485
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
486-
-DUSE_CLING=ON \
487-
-DUSE_REPL=OFF \
486+
-DCPPINTEROP_USE_CLING=ON \
487+
-DCPPINTEROP_USE_REPL=OFF \
488488
-DCPPINTEROP_INCLUDE_DOCS=${{ matrix.documentation }} \
489489
-DCling_DIR=$LLVM_BUILD_DIR/tools/cling \
490490
-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
@@ -370,8 +370,8 @@ jobs:
370370
if ( "${{ matrix.cling }}" -imatch "On" )
371371
{
372372
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
373-
-DUSE_CLING=ON `
374-
-DUSE_REPL=OFF `
373+
-DCPPINTEROP_USE_CLING=ON `
374+
-DCPPINTEROP_USE_REPL=OFF `
375375
-DCling_DIR="$env:LLVM_BUILD_DIR\tools\cling" `
376376
-DLLVM_DIR="$env:LLVM_BUILD_DIR" `
377377
-DLLVM_ENABLE_WERROR=On `

.github/workflows/clang-format.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ jobs:
3333
sudo apt update
3434
sudo apt install -y clang-format-18
3535
36-
- name: Download git-clang-format
37-
run: |
38-
wget https://raw.githubusercontent.com/llvm/llvm-project/main/clang/tools/clang-format/git-clang-format
39-
chmod +x git-clang-format
40-
4136
- name: Run git-clang-format
4237
run: |
4338
PR_BASE=$(git rev-list ${{ github.event.pull_request.head.sha }} ^${{ github.event.pull_request.base.sha }} | tail --lines 1 | xargs -I {} git rev-parse {}~1)

.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

0 commit comments

Comments
 (0)