Skip to content

Commit 9f8f9cf

Browse files
aphecetchedavidrohr
authored andcommitted
[CMake] Documentation updates related to Modern CMake Migration
1 parent bd96b4f commit 9f8f9cf

70 files changed

Lines changed: 1044 additions & 948 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

EventVisualisation/Base/README.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1 @@
11
\page refEventVisualisationBase EventVisualisation Base
2-
3-
Example 1
4-
=========
5-
6-
[TOC]
7-
8-
# Introduction {#Introduction}
9-
10-
This is an example of a basic module using the O2 CMake macros to generate a library and an executable.
11-
12-
## Macros and variables {#Macros}
13-
14-
- O2_SETUP : necessary to register the module in O2.
15-
- O2_GENERATE_LIBRARY : use once and only once per module to generate a library.
16-
- O2_GENERATE_EXECUTABLE : generate executables.
17-
- HEADERS is not needed in case we don't generate a dictionary.
18-
19-
## Classes {#Classes}
20-
21-
We have one class that belongs to the interface (Foo) and one class that is internal (Bar).
22-
As a consequence, the header of the former should go to the include directory whereas the header
23-
of the second must go to the src directory.
24-
25-
Foo uses Bar, both are included in the library. The executable uses Foo.
26-
27-
# Documentation {#Documentation}
28-
29-
The documentation is in markdown with special markers for doxygen such as `[TOC]`.
30-
Note the that the TOC will work only if no levels are skip (don't create a subsection without a section
31-
above it).

Examples/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
add_subdirectory (flp2epn)
2-
add_subdirectory (flp2epn-distributed)
3-
add_subdirectory (ExampleModule1)
4-
add_subdirectory (ExampleModule2)
1+
add_subdirectory(Ex1)
2+
add_subdirectory(Ex2)
3+
add_subdirectory(Ex3)
4+
add_subdirectory(Ex4)
5+
add_subdirectory(Ex5)
6+
add_subdirectory(flp2epn)
7+
add_subdirectory(flp2epn-distributed)

Examples/Ex1/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
o2_add_library(Ex1
2+
SOURCES src/A.cxx src/B.cxx
3+
PUBLIC_LINK_LIBRARIES FairMQ::FairMQ)

Examples/Ex1/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
\page refEx1 Ex1 A basic example with one library
2+
3+
See [CMakeInstructions](../doc/CMakeInstructions.md) for an explanation about this directory.

Examples/Ex1/include/Ex1/A.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#ifndef _A_H_
2+
#define _A_H_
3+
4+
class A
5+
{
6+
public:
7+
A();
8+
};
9+
#endif

Examples/Ex1/src/A.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "Ex1/A.h"
2+
#include <iostream>
3+
4+
A::A()
5+
{
6+
std::cout << "Hello from A ctor\n";
7+
}

Examples/Ex1/src/B.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "B.h"
2+
#include <iostream>
3+
#include "fairmq/FairMQDevice.h"
4+
5+
B::B()
6+
{
7+
std::cout << "Hello from B\n";
8+
}

Examples/Ex1/src/B.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#ifndef _B_H_
2+
#define _B_H_
3+
4+
class B
5+
{
6+
public:
7+
B();
8+
};
9+
#endif

Examples/Ex2/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
o2_add_library(Ex2
2+
SOURCES src/A.cxx src/B.cxx
3+
PUBLIC_LINK_LIBRARIES FairMQ::FairMQ)
4+
5+
o2_target_root_dictionary(Ex2
6+
HEADERS include/Ex2/A.h src/B.h
7+
LINKDEF src/Ex2LinkDef.h)

Examples/Ex2/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
\page refEx2 Ex2 A basic library with a Root dictionary
2+
3+
See [CMakeInstructions](../doc/CMakeInstructions.md) for an explanation about this directory.

0 commit comments

Comments
 (0)