-
Notifications
You must be signed in to change notification settings - Fork 1
Restructuring #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
a56df2b
2ff8918
f0e0ef4
e172568
650e549
cbad6b8
2813225
34e54c8
dc6da60
4755ba1
5c35c39
f455f2b
b1c3f48
baf0205
9b281a0
60fdd9e
f828e59
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
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-magic-numbers, | ||
-readability-named-parameter, | ||
-readability-function-cognitive-complexity, | ||
-readability-implicit-bool-conversion, | ||
-cppcoreguidelines-avoid-magic-numbers, | ||
-clang-analyzer-cplusplus.NewDeleteLeaks, | ||
|
||
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.PrivateMemberPrefix | ||
value: 'm_' | ||
- key: readability-identifier-naming.ProtectedMemberPrefix | ||
value: 'm_' | ||
- key: readability-identifier-naming.PublicMemberPrefix | ||
value: '' | ||
- 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: readability-implicit-bool-conversion.AllowPointerConditions | ||
value: 1 | ||
- key: readability-magic-numbers.IgnorePowersOf2IntegerValues | ||
value: 1 | ||
- key: readability-magic-numbers.IgnoredIntegerValues | ||
value: 4;8;16; | ||
- key: bugprone-argument-comment.CommentNullPtrs | ||
value: 1 | ||
- key: bugprone-argument-comment.CommentBoolLiterals | ||
value: 1 | ||
- key: bugprone-argument-comment.StrictMode | ||
value: 1 | ||
- key: bugprone-argument-comment.CommentIntegerLiterals | ||
value: 1 | ||
- key: bugprone-argument-comment.CommentUserDefinedLiterals | ||
value: 1 | ||
- key: bugprone-argument-comment.CommentStringLiterals | ||
value: 1 | ||
- key: bugprone-argument-comment.CommentFloatLiterals | ||
value: 1 | ||
- key: bugprone-argument-comment.CommentCharacterLiterals | ||
value: 1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,9 @@ tmp/ | |
*.bk | ||
*.rootix | ||
*.sam | ||
build/ | ||
cmake-build-*/ | ||
Build/ | ||
BUILD/ | ||
Testing/ | ||
.vscode/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,83 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
project(ramtools VERSION 1.0.0 LANGUAGES CXX) | ||
|
||
project(ramtools LANGUAGES CXX) | ||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
|
||
find_package(ROOT 6.26 REQUIRED | ||
COMPONENTS Core RIO Tree ROOTNTuple) | ||
option(RAMTOOLS_BUILD_TESTS "Build unit tests" ON) | ||
option(RAMTOOLS_BUILD_BENCHMARKS "Build benchmarks" ON) | ||
option(RAMTOOLS_BUILD_TOOLS "Build tools" ON) | ||
|
||
set(RNTUPLE_LIBS ROOT::ROOTNTuple ROOT::ROOTNTupleUtil) | ||
find_package(ROOT 6.26 REQUIRED COMPONENTS Core RIO Tree ROOTNTuple ROOTNTupleUtil) | ||
AdityaPandeyCN marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
include(${ROOT_USE_FILE}) | ||
|
||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/rntuple) | ||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc/ttree) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably use |
||
|
||
ROOT_STANDARD_LIBRARY_PACKAGE(ramrecord | ||
SOURCES ramrecord.C | ||
HEADERS ramrecord.h | ||
LIBRARIES ROOT::Core ROOT::RIO ROOT::Tree | ||
ROOT_GENERATE_DICTIONARY(G__ramtools_tree | ||
RAMRecord.h | ||
Utils.h | ||
CigarOps.h | ||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/inc/ttree/LinkDef.h | ||
MODULE ramtools_tree | ||
) | ||
|
||
set(RAMTOOLS_ROOT_LIBS ROOT::Core ROOT::RIO ROOT::Tree) | ||
add_library(ramtools_tree SHARED | ||
src/ttree/RAMRecord.cxx | ||
G__ramtools_tree.cxx | ||
) | ||
|
||
target_include_directories(ramtools_tree PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc/ttree> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> | ||
$<INSTALL_INTERFACE:include/ttree> | ||
) | ||
target_link_libraries(ramtools_tree PUBLIC | ||
ROOT::Core | ||
ROOT::RIO | ||
ROOT::Tree | ||
) | ||
|
||
ROOT_STANDARD_LIBRARY_PACKAGE(ramntuplerecord | ||
SOURCES rntuple/RAMntuplerecord.C | ||
HEADERS rntuple/RAMNTupleRecord.h | ||
LIBRARIES ROOT::Core ROOT::RIO ROOT::Tree ${RNTUPLE_LIBS} | ||
add_library(ramtools_ntuple SHARED | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this is a separate library? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought it was better to separate them but now will make it one. |
||
src/rntuple/RAMNTupleRecord.cxx | ||
) | ||
target_include_directories(ramtools_ntuple PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc/rntuple> | ||
$<INSTALL_INTERFACE:include/rntuple> | ||
) | ||
target_link_libraries(ramtools_ntuple PUBLIC | ||
ROOT::Core | ||
ROOT::RIO | ||
ROOT::Tree | ||
ROOT::ROOTNTuple | ||
ROOT::ROOTNTupleUtil | ||
) | ||
|
||
ROOT_EXECUTABLE(samtoramntuple | ||
vgvassilev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
rntuple/samtoramntuple.C | ||
LIBRARIES ramntuplerecord ${RAMTOOLS_ROOT_LIBS} ${RNTUPLE_LIBS}) | ||
install(TARGETS ramtools_tree ramtools_ntuple | ||
LIBRARY DESTINATION lib | ||
ARCHIVE DESTINATION lib | ||
) | ||
install(DIRECTORY inc/ DESTINATION include) | ||
|
||
install(FILES | ||
${CMAKE_CURRENT_BINARY_DIR}/libramtools_tree_rdict.pcm | ||
${CMAKE_CURRENT_BINARY_DIR}/libramtools_tree.rootmap | ||
DESTINATION lib | ||
) | ||
|
||
if(RAMTOOLS_BUILD_TOOLS) | ||
add_subdirectory(tools) | ||
endif() | ||
|
||
if(RAMTOOLS_BUILD_TESTS) | ||
enable_testing() | ||
add_subdirectory(test) | ||
endif() | ||
|
||
include(CTest) | ||
file(GLOB RAMTESTS tests/test_*.C) | ||
foreach(testfile ${RAMTESTS}) | ||
get_filename_component(testname ${testfile} NAME_WE) | ||
add_test(NAME ${testname} | ||
COMMAND root -l -b -q ${testfile}+) | ||
set_tests_properties(${testname} PROPERTIES WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) | ||
endforeach() | ||
if(RAMTOOLS_BUILD_BENCHMARKS) | ||
add_subdirectory(benchmark) | ||
endif() | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Benchmark targets can be added here in future | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/ramtoolsTargets.cmake") | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this file needed? |
Uh oh!
There was an error while loading. Please reload this page.