Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
merger-stat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
side-projects
ganil
merger-stat
Commits
6aca437b
Commit
6aca437b
authored
1 week ago
by
Diego Gruyer
Committed by
uindra
1 week ago
Browse files
Options
Downloads
Patches
Plain Diff
adding gitignore and dummy CMake
parent
cadaee28
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+6
-0
6 additions, 0 deletions
.gitignore
CMakeLists.txt
+266
-0
266 additions, 0 deletions
CMakeLists.txt
with
272 additions
and
0 deletions
.gitignore
0 → 100644
+
6
−
0
View file @
6aca437b
*.cflags
*.config
*.creator
*.cxxflags
*.files
*.includes
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
266
−
0
View file @
6aca437b
cmake_minimum_required
(
VERSION 2.8.11
)
set
(
proj_name fazia-ecc
)
set
(
proj_version 2.0
)
if
(
${
CMAKE_VERSION
}
VERSION_LESS 3.0
)
project
(
${
proj_name
}
)
set
(
PROJECT_VERSION
${
proj_version
}
)
set
(
${
proj_name
}
_VERSION
${
proj_version
}
)
else
()
cmake_policy
(
VERSION 3.0
)
project
(
${
proj_name
}
VERSION
${
proj_version
}
)
endif
()
set
(
CMAKE_BUILD_TYPE
"RelWithDebInfo"
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
CMAKE_SOURCE_DIR
}
/cmake
${
CMAKE_SOURCE_DIR
}
/externals/cmake/AddSubproject
)
include
(
AddSubproject
)
# automatically add paths to external libraries to RPATH of all binaries
set
(
CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE
)
# =============================================================================
# ------------------------------ Build options --------------------------------
# =============================================================================
option
(
USE_TAPIRMQ
"use TapirMQ-client to push metadata and logs to InfluxDB"
ON
)
set
(
LIBARIES_TO_LINK
)
# look for KaliVeda with FAZIA libraries and optionally sqlite
find_package
(
KaliVeda 1.10 REQUIRED FAZIA
)
include
(
${
KALIVEDA_USE_FILE
}
)
list
(
APPEND LIBRARIES_TO_LINK
${
KALIVEDA_LIBRARIES
}
)
# look for ROOT
find_package
(
ROOT REQUIRED GuiHtml Thread
)
include
(
SetUpROOTBuild
)
list
(
APPEND LIBRARIES_TO_LINK
${
ROOT_LIBRARIES
}
)
# look for libcurl
find_package
(
CURL REQUIRED
)
if
(
CURL_FOUND
)
include_directories
(
${
CURL_INCLUDE_DIRS
}
)
endif
()
# to read GANIL MFM merged frame (INDRA-FAZIA)
#---sources available from: https://gitlab.in2p3.fr/jdfcode/mfmlib.git
find_package
(
mfmlib QUIET
)
if
(
mfmlib_FOUND
)
set
(
HAVE_MFMLIB yes
)
include_directories
(
${
mfmlib_INCLUDE_DIRS
}
)
list
(
APPEND LIBRARIES_TO_LINK
${
mfmlib_LIBRARIES
}
)
endif
(
mfmlib_FOUND
)
# to read GANIL Mesytec data
#---sources available from: https://gitlab.in2p3.fr/mesytec-ganil/mesytec_data
find_package
(
mesytec_data REQUIRED
)
if
(
mesytec_data_FOUND
)
set
(
WITH_MESYTEC yes
)
include_directories
(
${
mesytec_data_INCLUDE_DIRS
}
)
list
(
APPEND LIBRARIES_TO_LINK
${
mesytec_data_LIBRARIES
}
)
else
()
message
(
STATUS
"mesytec_data not found..."
)
endif
()
# look for boost
find_package
(
Boost COMPONENTS program_options
)
if
(
Boost_PROGRAM_OPTIONS_FOUND
)
set
(
HAVE_BOOST yes
)
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
list
(
APPEND LIBRARIES_TO_LINK
${
Boost_PROGRAM_OPTIONS_LIBRARY
}
)
endif
()
include
(
GNUInstallDirs
)
set
(
CMAKE_INSTALL_PKGINCDIR
${
CMAKE_INSTALL_INCLUDEDIR
}
/
${
PROJECT_NAME
}
)
set
(
CMAKE_INSTALL_PKGLIBDIR
${
CMAKE_INSTALL_LIBDIR
}
/
${
PROJECT_NAME
}
)
set
(
CMAKE_INSTALL_PKGCONFIGDIR
${
CMAKE_INSTALL_LIBDIR
}
/cmake/
${
PROJECT_NAME
}
)
#-------------------------------------------------------------------------------------------
# Build & install analysis tools (former fazia-oscillo branch)
# look for protobuf
find_package
(
Protobuf
)
if
(
NOT PROTOBUF_FOUND
)
# we may need pkg-config to find installation
find_package
(
PkgConfig QUIET
)
if
(
PkgConfig_FOUND
)
message
(
STATUS
"Looking for protobuf with pkg-config"
)
## use pkg-config to get hints for protobuf locations
pkg_check_modules
(
PROTOBUF QUIET protobuf
)
if
(
PROTOBUF_FOUND
)
set
(
CMAKE_LIBRARY_PATH
${
PROTOBUF_LIBRARY_DIRS
}
${
CMAKE_LIBRARY_PATH
}
)
set
(
PROTOBUF_INCLUDE_DIR
${
PROTOBUF_INCLUDE_DIRS
}
)
set
(
Protobuf_INCLUDE_DIR
${
PROTOBUF_INCLUDE_DIRS
}
)
find_package
(
Protobuf
)
endif
(
PROTOBUF_FOUND
)
endif
(
PkgConfig_FOUND
)
endif
(
NOT PROTOBUF_FOUND
)
if
(
PROTOBUF_FOUND
)
# protobuf requires C++11 or higher
# check if -std=c++11/4/7 flag already in cxx flags
string
(
FIND
${
CMAKE_CXX_FLAGS
}
"-std=c++11"
CPP11_FLAGS
)
string
(
FIND
${
CMAKE_CXX_FLAGS
}
"-std=c++14"
CPP14_FLAGS
)
string
(
FIND
${
CMAKE_CXX_FLAGS
}
"-std=c++17"
CPP17_FLAGS
)
if
((
CPP11_FLAGS GREATER 0
)
OR
(
CPP14_FLAGS GREATER 0
)
OR
(
CPP17_FLAGS GREATER 0
))
# nothing to do, one of flags is already present
else
()
include
(
CheckCXXCompilerFlag
)
CHECK_CXX_COMPILER_FLAG
(
"-std=c++11"
COMPILER_SUPPORTS_CXX11
)
if
(
COMPILER_SUPPORTS_CXX11
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11"
)
endif
()
endif
()
endif
(
PROTOBUF_FOUND
)
add_definitions
(
-DOSCILLO_DATADIR=
"
${
CMAKE_INSTALL_FULL_SYSCONFDIR
}
"
)
# look for ZeroMQ
find_package
(
ZMQ
)
if
(
PROTOBUF_FOUND AND ZMQ_FOUND
)
set
(
HAVE_PROTOBUF yes
)
include_directories
(
${
PROTOBUF_INCLUDE_DIRS
}
)
message
(
STATUS
"Protobuf include dir =
${
PROTOBUF_INCLUDE_DIRS
}
"
)
include_directories
(
${
CMAKE_BINARY_DIR
}
/protobuf
)
set
(
HAVE_ZMQ_H yes
)
include_directories
(
${
ZMQ_INCLUDE_DIRS
}
)
list
(
APPEND LIBRARIES_TO_LINK
${
ZMQ_LIBRARIES
}
)
message
(
STATUS
"ZMQ include dir =
${
ZMQ_INCLUDE_DIRS
}
"
)
message
(
STATUS
"ZMQ library =
${
ZMQ_LIBRARIES
}
"
)
# generate protobuf source from event description
set
(
FAZIA_EVENT_PROTO FzEventSet.proto
)
add_subdirectory
(
protobuf
)
get_property
(
FAZIA_PROTOBUF_LIB GLOBAL PROPERTY FAZIA_PROTOBUF_LIB
)
list
(
APPEND LIBRARIES_TO_LINK
${
FAZIA_PROTOBUF_LIB
}
)
endif
(
PROTOBUF_FOUND AND ZMQ_FOUND
)
set
(
LIBRARY_TARGETS
)
if
(
USE_TAPIRMQ
)
list
(
APPEND LIBRARY_TARGETS tapirmq-client
)
add_subproject
(
externals/tapirmq-client
PATH_TO_LIBS
"$ORIGIN/fazia-ecc:$ORIGIN/../lib/fazia-ecc"
)
message
(
NOTICE
"using TapirMQ-client library"
)
endif
(
USE_TAPIRMQ
)
# generate config.h
configure_file
(
${
CMAKE_SOURCE_DIR
}
/config.h.in
${
CMAKE_BINARY_DIR
}
/fzoscillo-config.h
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/fzoscillo-config.h DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
)
include_directories
(
${
CMAKE_BINARY_DIR
}
)
add_definitions
(
-DHAVE_CONFIG_H
)
add_definitions
(
-DPKGBUILDDIR=
${
PROJECT_BINARY_DIR
}
-DPKGDATADIR=
${
CMAKE_INSTALL_FULL_DATADIR
}
-DPKGHTMLDIR=
${
CMAKE_INSTALL_FULL_HTMLDIR
}
)
list
(
APPEND LIBRARY_TARGETS fazia-ecc-base
)
add_subdirectory
(
base
)
include_directories
(
${
CMAKE_SOURCE_DIR
}
/base
)
list
(
APPEND LIBRARY_TARGETS fazia-ecc-ecc
)
add_subdirectory
(
ecc
)
install_subproject_targets
()
include_directories
(
${
CMAKE_SOURCE_DIR
}
/ecc
)
list
(
APPEND LIBRARY_TARGETS fazia-ecc-mon
)
add_subdirectory
(
monitoring
)
include_directories
(
${
CMAKE_SOURCE_DIR
}
/monitoring
)
add_subdirectory
(
merger
)
list
(
APPEND LIBRARIES_TO_LINK
${
LIBRARY_TARGETS
}
)
add_subdirectory
(
execs
)
set
(
doc_DATA README INSTALL README.server README.usersguide COPYING
)
install
(
FILES
${
doc_DATA
}
DESTINATION
${
CMAKE_INSTALL_DOCDIR
}
)
install
(
DIRECTORY etc/ DESTINATION
${
CMAKE_INSTALL_SYSCONFDIR
}
)
# install PHP scripts for webserver database access
install
(
DIRECTORY webserver DESTINATION
${
CMAKE_INSTALL_SYSCONFDIR
}
)
include
(
CreateConfigScript
)
create_config_script
()
if
(
PROTOBUF_FOUND AND ZMQ_FOUND
)
if
(
DEFINED ENV{SITE}
)
if
(
$ENV{SITE} STREQUAL
"CCIN2P3"
)
#-at IN2P3 Computing Centre, build with support for xrootd
find_package
(
XROOTD
)
if
(
XROOTD_FOUND
)
list
(
APPEND LIBRARIES_TO_LINK
${
XROOTD_LIBRARIES
}
)
endif
()
endif
()
endif
()
# configure subdirectories for different executables
add_subdirectory
(
oscillo
)
add_subdirectory
(
viewer
)
if
(
HAVE_MFMLIB AND WITH_MESYTEC
)
add_subdirectory
(
indra-viewer
)
add_subdirectory
(
indra-scaler
)
endif
()
# - obsolete: do not build
# add_subdirectory(converter)
add_subdirectory
(
database
)
add_subdirectory
(
replay
)
add_subdirectory
(
scaler
)
endif
(
PROTOBUF_FOUND AND ZMQ_FOUND
)
include
(
CheckCXXSymbolExists
)
set
(
CMAKE_REQUIRED_INCLUDES
${
KALIVEDA_INCLUDE_DIR
}
)
CHECK_CXX_SYMBOL_EXISTS
(
WITH_RSQLITE KVConfig.h GOT_KVSQLITE
)
if
(
GOT_KVSQLITE
)
message
(
STATUS
"Got KVSQLITE"
)
add_subdirectory
(
dbviewer
)
else
()
message
(
STATUS
"No KVSQLITE: dbviewer directory will not be compiled"
)
endif
()
# set RPATH on all executables in order to find private utility libraries
# libfazia_protobuf_event.so & libfazia_sound.so which will not be installed in a
# standard library directory but in $PREFIX/bin/fazia-ecc/
get_property
(
EXEC_TARGET_LIST GLOBAL PROPERTY EXEC_TARGET_LIST
)
foreach
(
exec_target
${
EXEC_TARGET_LIST
}
)
get_target_property
(
TARGET_RUNPATH
${
exec_target
}
INSTALL_RPATH
)
list
(
APPEND TARGET_RUNPATH
${
CMAKE_INSTALL_FULL_BINDIR
}
/
${
PROJECT_NAME
}
)
set_target_properties
(
${
exec_target
}
PROPERTIES INSTALL_RPATH
"
${
TARGET_RUNPATH
}
"
)
endforeach
()
#install user's guides
install
(
DIRECTORY doc/ DESTINATION
${
CMAKE_INSTALL_HTMLDIR
}
)
#generate & install class reference doc
add_custom_target
(
html
make -f
${
PROJECT_SOURCE_DIR
}
/make.html ROOTEXEC=
${
ROOT_EXECUTABLE
}
srcdir=
${
PROJECT_SOURCE_DIR
}
builddir=
${
PROJECT_BUILD_DIR
}
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
PROJECT_BINARY_DIR
}
/htmldoc
${
CMAKE_INSTALL_FULL_HTMLDIR
}
WORKING_DIRECTORY
${
PROJECT_SOURCE_DIR
}
)
find_package
(
Protobuf REQUIRED
)
PROTOBUF_GENERATE_CPP
(
PROTO_SRCS PROTO_HDRS MergerInfo.proto
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment