Skip to content

Commit

Permalink
Enable the CppInterOp library
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronj0 committed Feb 19, 2025
1 parent 3f7ac0a commit ea4b844
Show file tree
Hide file tree
Showing 73 changed files with 23,291 additions and 0 deletions.
12 changes: 12 additions & 0 deletions interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -514,3 +514,15 @@ mark_as_advanced(FORCE BUG_REPORT_URL BUILD_CLANG_FORMAT_VS_PLUGIN BUILD_SHARED_
C_INCLUDE_DIRS DEFAULT_SYSROOT FFI_INCLUDE_DIR FFI_LIBRARY_DIR
GCC_INSTALL_PREFIX LIBCLANG_BUILD_STATIC TOOL_INFO_PLIST)
mark_as_advanced(CLEAR LLVM_ENABLE_ASSERTIONS LLVM_BUILD_TYPE)

##################### LIBINTEROP ###########################

#---Set InterOp include directories, for any ROOT component that requires the headers--------------------------------------------------------
set(CPPINTEROP_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/CppInterOp/include
CACHE STRING "CppInterOp include directories.")

#---Set InterOp to build on Cling, this can be toggled to use Clang-REPL-------------------------------------------------------
set(CPPINTEROP_USE_CLING ON BOOL "Use Cling as backend")

add_subdirectory(CppInterOp)
17 changes: 17 additions & 0 deletions interpreter/CppInterOp/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
BasedOnStyle: LLVM

Language: Cpp
Standard: Cpp11
PointerAlignment: Left

IncludeCategories:
- Regex: '^"[^/]+\"'
Priority: 10
- Regex: '^"cling/'
Priority: 20
- Regex: '^"clang/'
Priority: 30
- Regex: '^"llvm/'
Priority: 40
- Regex: '^<'
Priority: 50
60 changes: 60 additions & 0 deletions interpreter/CppInterOp/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Checks: >
-*,
bugprone-*,
clang-diagnostic-*,
clang-analyzer-*,
cppcoreguidelines-*,
llvm-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*,
-bugprone-narrowing-conversions,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-unchecked-optional-access,
-misc-const-correctness,
-misc-unused-parameters,
-misc-non-private-member-variables-in-classes,
-misc-no-recursion,
-misc-use-anonymous-namespace,
-modernize-return-braced-init-list,
-modernize-use-trailing-return-type,
-readability-braces-around-statements,
-readability-identifier-length,
-readability-implicit-bool-conversion,
-readability-magic-numbers,
-readability-named-parameter,
-readability-function-cognitive-complexity,
-readability-redundant-access-specifiers,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-macro-usage,
-llvm-namespace-comment
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: aNy_CasE
- key: readability-identifier-naming.FunctionCase
value: aNy_CasE
- key: readability-identifier-naming.MemberCase
value: aNy_CasE
- key: readability-identifier-naming.ParameterCase
value: aNy_CasE
- key: readability-identifier-naming.UnionCase
value: CamelCase
- key: readability-identifier-naming.VariableCase
value: aNy_CasE
- key: readability-identifier-naming.IgnoreMainLikeFunctions
value: 1
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreMacros
value: 1
- key: cppcoreguidelines-pro-bounds-pointer-arithmetic.Pessimistic
value: 1
- key: cppcoreguidelines-pro-type-member-init.InitWithEquals
value: 1
- key: llvm-namespace-comment.Spaces
value: 2
25 changes: 25 additions & 0 deletions interpreter/CppInterOp/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
codecov:
require_ci_to_pass: no

coverage:
precision: 2
round: down
range: "70...100"

status:
project: yes
patch: yes
changes: no

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment:
layout: "reach, diff, flags, tree, files"
behavior: default
require_changes: no
41 changes: 41 additions & 0 deletions interpreter/CppInterOp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Directories
build
install

# CLion files
.idea

# VSCode files
.vscode

# Default Virtual Environments
.venv
16 changes: 16 additions & 0 deletions interpreter/CppInterOp/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

sphinx:
configuration: docs/conf.py
builder: html

build:
os: "ubuntu-22.04"
tools:
python: "3.11"
apt_packages:
- clang-13
- cmake
- libclang-13-dev
- llvm-13-dev
- llvm-13-tools
Loading

0 comments on commit ea4b844

Please sign in to comment.