Skip to content

Commit fbb50b2

Browse files
committed
Framework: introduce Framework/Foundation module
This is to be used for any helper or compatibility macro which relies solely on C++17 and platform specific headers. It should not have any external dependency.
1 parent 95f4b37 commit fbb50b2

5 files changed

Lines changed: 52 additions & 0 deletions

File tree

Framework/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ if(ARROW_FOUND)
66
add_subdirectory(ArrowTests)
77
endif()
88
add_subdirectory(DebugGUI)
9+
add_subdirectory(Foundation)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright CERN and copyright holders of ALICE O2. This software is
2+
# distributed under the terms of the GNU General Public License v3 (GPL
3+
# Version 3), copied verbatim in the file "COPYING".
4+
#
5+
# See http://alice-o2.web.cern.ch/ for full licensing information.
6+
#
7+
# In applying this license CERN does not waive the privileges and immunities
8+
# granted to it by virtue of its status as an Intergovernmental Organization
9+
# or submit itself to any jurisdiction.
10+
11+
set(MODULE_NAME "FrameworkFoundation")
12+
13+
set(MODULE_BUCKET_NAME O2FrameworkFoundation_bucket)
14+

Framework/Foundation/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## O2 Framework Foundation
2+
3+
Nothing but pure C++ helpers go here. No dependencies allowed.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
// Compatibility layer for a few common builtins found in different compilers.
12+
// These are trivial and the goal is to make sure we can compile on non GCC /
13+
// clang compilers if requested.
14+
15+
#if __GNUC__
16+
#define O2_BUILTIN_UNREACHABLE __builtin_unreachable
17+
#elif __clang__
18+
#define O2_BUILTIN_UNREACHABLE __builtin_unreachable
19+
#else
20+
#define O2_BUILTIN_UNREACHABLE
21+
#endif

cmake/O2Dependencies.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ o2_define_bucket(
172172
glfw_bucket
173173

174174
DEPENDENCIES
175+
O2FrameworkFoundation_bucket
175176
${GLFW_LIBRARIES}
176177

177178
INCLUDE_DIRECTORIES
@@ -181,6 +182,9 @@ o2_define_bucket(
181182
o2_define_bucket(
182183
NAME
183184
headless_bucket
185+
186+
DEPENDENCIES
187+
O2FrameworkFoundation_bucket
184188
)
185189

186190
o2_define_bucket(
@@ -289,12 +293,21 @@ o2_define_bucket(
289293
${InfoLogger_INCLUDE_DIRS}
290294
)
291295

296+
o2_define_bucket(
297+
NAME
298+
O2FrameworkFoundation_bucket
299+
300+
INCLUDE_DIRECTORIES
301+
${CMAKE_SOURCE_DIR}/Framework/Foundation/include
302+
)
303+
292304
o2_define_bucket(
293305
NAME
294306
O2FrameworkCore_bucket
295307

296308
DEPENDENCIES
297309
arrow_bucket
310+
O2FrameworkFoundation_bucket
298311
O2DeviceApplication_bucket
299312
common_utils_bucket
300313
ROOTDataFrame

0 commit comments

Comments
 (0)