Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ IndentCaseLabels: true
IndentFunctionDeclarationAfterType: true
IndentWidth: 2
# It is broken on windows. Breaks all #include "header.h"
---
Language: Cpp
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: true
Expand All @@ -49,3 +50,7 @@ SpacesInParentheses: false
Standard: Cpp11
TabWidth: 2
UseTab: Never
---
# Do not format protobuf files
Language: Proto
DisableFormat: true
204 changes: 204 additions & 0 deletions .cmake-format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
# How wide to allow formatted cmake files
line_width = 80

# How many spaces to tab for indent
tab_size = 2

# If arglists are longer than this, break them always
max_subargs_per_line = 5

# If true, separate flow control names from their parentheses with a space
separate_ctrl_name_with_space = False

# If true, separate function names from parentheses with a space
separate_fn_name_with_space = False

# If a statement is wrapped to more than one line, than dangle the closing
# parenthesis on it's own line
dangle_parens = False

# What character to use for bulleted lists
bullet_char = '*'

# What character to use as punctuation after numerals in an enumerated list
enum_char = '.'

# What style line endings to use in the output.
line_ending = 'unix'

# Format command names consistently as 'lower' or 'upper' case
command_case = 'canonical'

# Format keywords consistently as 'lower' or 'upper' case
keyword_case = 'upper'

# Specify structure for custom cmake functions
# * = ZERO_OR_MORE
# + = ONE_OR_MORE
additional_commands = {
"o2_add_executable": {
"flags": ["IS_TEST", "IS_BENCHMARK", "NO_INSTALL"],
"kwargs": {
"SOURCES": '+',
"PUBLIC_LINK_LIBRARIES": '*',
"COMPONENT_NAME": '*',
"EXEVARNAME": '*'
}
},
"o2_add_header_only_library": {
"kwargs": {
"INCLUDE_DIRECTORIES": '*',
"INTERFACE_LINK_LIBRARIES": '*',
}
},
"o2_add_library": {
"kwargs": {
"SOURCES": '+',
"PUBLIC_INCLUDE_DIRECTORIES": '*',
"PUBLIC_LINK_LIBRARIES": '*',
"PRIVATE_INCLUDE_DIRECTORIES": '*',
"TARGETVARNAME": '*',
}
},
"o2_target_root_dictionary": {
"kwargs": {
"LINKDEF": '+',
"HEADERS": '*',
}
},
"o2_target_man_page": {
"kwargs": {
"NAME": '+',
"SECTION": '*',
}
},
"add_root_dictionary": {
"kwargs": {
"LINKDEF": '+',
"HEADERS": '*',
"BASENAME": '*',
}
},
"o2_data_file": {
"kwargs": {
"COPY": '+',
"DESTINATION": '*',
}
},
"o2_add_test_wrapper": {
"flags": ["DONT_FAIL_ON_TIMEOUT", "NON_FATAL"],
"kwargs": {
"COMMAND": '*',
"NO_BOOST_TEST": '*',
"MAX_ATTEMPTS": '*',
"TIMEOUT": '*',
"NAME": '*',
"WORKING_DIRECTORY": '*',
"CONFIGURATIONS": '*',
"COMMAND_LINE_ARGS": '*',
"LABELS": '*',
"ENVIRONMENT": '*',
}
},
"o2_add_test": {
"kwargs": {
"INSTALL": '*',
"NO_BOOST_TEST": '*',
"NON_FATAL": '*',
"COMPONENT_NAME": '*',
"MAX_ATTEMPTS": '*',
"TIMEOUT": '*',
"WORKING_DIRECTORY": '*',
"SOURCES": '*',
"PUBLIC_LINK_LIBRARIES": '*',
"COMMAND_LINE_ARGS": '*',
"LABELS": '*',
"ENVIRONMENT": '*',
}
},
"o2_add_test_root_macro": {
"flags": ["NON_FATAL", "LOAD_ONLY"],
"kwargs": {
"ENVIRONMENT": '*',
"PUBLIC_LINK_LIBRARIES": '*',
"LABELS": '*',
}
},
"o2_name_target": {
"kwargs": {
"INCLUDE_DIRECTORIES": '*',
"INTERFACE_LINK_LIBRARIES": '*',
}
},
"find_package_handle_standard_args": {
"flags": ["CONFIG_MODE"],
"kwargs": {
"DEFAULT_MSG": '*',
"REQUIRED_VARS": '*',
"VERSION_VAR": '*',
"HANDLE_COMPONENTS": '*',
"FAIL_MESSAGE": '*'
}
},
"set_package_properties": {
"kwargs": {
"PROPERTIES": '*',
"URL": '*',
"TYPE": '*',
"PURPOSE": '*'
}
}
}

# A list of command names which should always be wrapped
always_wrap = []

# Specify the order of wrapping algorithms during successive reflow attempts
algorithm_order = [0, 1, 2, 3, 4]

# If true, the argument lists which are known to be sortable will be sorted
# lexicographicall
autosort = False

# enable comment markup parsing and reflow
enable_markup = True

# If comment markup is enabled, don't reflow the first comment block in
# eachlistfile. Use this to preserve formatting of your
# copyright/licensestatements.
first_comment_is_literal = False

# If comment markup is enabled, don't reflow any comment block which matchesthis
# (regex) pattern. Default is `None` (disabled).
literal_comment_pattern = None

# Regular expression to match preformat fences in comments
# default=r'^\s*([`~]{3}[`~]*)(.*)$'
fence_pattern = '^\\s*([`~]{3}[`~]*)(.*)$'

# Regular expression to match rulers in comments
# default=r'^\s*[^\w\s]{3}.*[^\w\s]{3}$'
ruler_pattern = '^\\s*[^\\w\\s]{3}.*[^\\w\\s]{3}$'

# If true, emit the unicode byte-order mark (BOM) at the start of the file
emit_byteorder_mark = False

# If a comment line starts with at least this many consecutive hash characters,
# then don't lstrip() them off. This allows for lazy hash rulers where the first
# hash char is not separated by space
hashruler_min_length = 10

# If true, then insert a space between the first hash char and remaining hash
# chars in a hash ruler, and normalize it's length to fill the column
canonicalize_hashrulers = True

# Specify the encoding of the input file. Defaults to utf-8.
input_encoding = 'utf-8'

# Specify the encoding of the output file. Defaults to utf-8. Note that cmake
# only claims to support utf-8 so be careful when using anything else
output_encoding = 'utf-8'

# A dictionary containing any per-command configuration overrides. Currently
# only `command_case` is supported.
per_command = {}
111 changes: 54 additions & 57 deletions Algorithm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,57 +1,54 @@
# @author Matthias Richter
# @brief cmake setup for module Algorithm

set(MODULE_NAME "Algorithm")

O2_SETUP(NAME ${MODULE_NAME})

set(SRCS
)

set(LIBRARY_NAME ${MODULE_NAME})

set(BUCKET_NAME Algorithm_bucket)

# no library for the moment
#O2_GENERATE_LIBRARY()

Set(Exe_Names
)

set(Exe_Source
)

list(LENGTH Exe_Names _length)
if (LENGTH)
math(EXPR _length ${_length}-1)

ForEach (_file RANGE 0 ${_length})
list(GET Exe_Names ${_file} _name)
list(GET Exe_Source ${_file} _src)
O2_GENERATE_EXECUTABLE(
EXE_NAME ${_name}
SOURCES ${_src}
MODULE_LIBRARY_NAME ${LIBRARY_NAME}
BUCKET_NAME ${BUCKET_NAME}
)
EndForEach (_file RANGE 0 ${_length})
endif()

set(TEST_SRCS
test/o2formatparser.cxx
test/headerstack.cxx
test/parser.cxx
test/tableview.cxx
test/pageparser.cxx
test/test_mpl_tools.cxx
test/test_RangeTokenizer.cxx
test/test_BitstreamReader.cxx
)

O2_GENERATE_TESTS(
BUCKET_NAME ${BUCKET_NAME}
TEST_SRCS ${TEST_SRCS}
)

O2_GENERATE_MAN(NAME Algorithm SECTION 3)
O2_GENERATE_MAN(NAME algorithm_parser SECTION 3)
# Copyright CERN and copyright holders of ALICE O2. This software is distributed
# under the terms of the GNU General Public License v3 (GPL Version 3), copied
# verbatim in the file "COPYING".
#
# See http://alice-o2.web.cern.ch/license for full licensing information.
#
# In applying this license CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Organization or
# submit itself to any jurisdiction.

o2_add_header_only_library(Algorithm INTERFACE_LINK_LIBRARIES O2::Headers)

o2_target_man_page(Algorithm NAME Algorithm SECTION 3)
o2_target_man_page(Algorithm NAME algorithm_parser SECTION 3)

o2_add_test(o2formatparser
SOURCES test/o2formatparser.cxx
COMPONENT_NAME Algorithm
PUBLIC_LINK_LIBRARIES O2::Algorithm
LABELS algorithm)

o2_add_test(headerstack
SOURCES test/headerstack.cxx
COMPONENT_NAME Algorithm
PUBLIC_LINK_LIBRARIES O2::Algorithm
LABELS algorithm)

o2_add_test(parser
SOURCES test/parser.cxx
COMPONENT_NAME Algorithm
PUBLIC_LINK_LIBRARIES O2::Algorithm
LABELS algorithm)

o2_add_test(tableview
SOURCES test/tableview.cxx
COMPONENT_NAME Algorithm
PUBLIC_LINK_LIBRARIES O2::Algorithm
LABELS algorithm)

o2_add_test(pageparser
SOURCES test/pageparser.cxx
COMPONENT_NAME Algorithm
PUBLIC_LINK_LIBRARIES O2::Algorithm
LABELS algorithm)

o2_add_test(mpl_tools
SOURCES test/test_mpl_tools.cxx
COMPONENT_NAME Algorithm
LABELS algorithm)

o2_add_test(RangeTokenizer
SOURCES test/test_RangeTokenizer.cxx
COMPONENT_NAME Algorithm
LABELS algorithm)
55 changes: 0 additions & 55 deletions AliceO2_test.cmake

This file was deleted.

Loading