Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eicd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
EIC
eicd
Commits
8f3f9553
Commit
8f3f9553
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: updated cmake with user-facing podio macros
parent
77871d98
No related branches found
No related tags found
No related merge requests found
Pipeline
#34814
failed
2 years ago
Stage: config
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+30
-40
30 additions, 40 deletions
CMakeLists.txt
with
30 additions
and
40 deletions
CMakeLists.txt
+
30
−
40
View file @
8f3f9553
...
...
@@ -13,6 +13,7 @@ if(APPLE)
set
(
CMAKE_SHARED_LIBRARY_SUFFIX
".so"
)
endif
(
APPLE
)
include
(
GNUInstallDirs
)
find_package
(
podio 0.14.1 REQUIRED
)
include_directories
(
${
podio_INCLUDE_DIR
}
)
...
...
@@ -22,57 +23,46 @@ find_package(EDM4HEP 0.4.1 REQUIRED)
#include(cmake/root.cmake)
list
(
APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS}
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
find_package
(
ROOT REQUIRED COMPONENTS Core RIO Tree
)
find_package
(
ROOT
6
REQUIRED COMPONENTS Core RIO Tree
)
include
(
${
ROOT_USE_FILE
}
)
PODIO_GENERATE_DATAMODEL
(
eicd eic_data.yaml headers sources OUTPUT_FOLDER
${
CMAKE_CURRENT_BINARY_DIR
}
)
PODIO_GENERATE_DATAMODEL
(
eicd eic_data.yaml headers sources
IO_BACKEND_HANDLERS
${
PODIO_IO_HANDLERS
}
OUTPUT_FOLDER
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_library
(
eicd SHARED
${
sources
}
)
PODIO_ADD_DATAMODEL_CORE_LIB
(
eicd
"
${
headers
}
"
"
${
sources
}
"
OUTPUT_FOLDER
${
CMAKE_CURRENT_BINARY_DIR
}
)
target_link_libraries
(
eicd
PUBLIC EDM4HEP::edm4hep
PUBLIC podio::podio
PUBLIC ROOT::Core
)
target_include_directories
(
eicd
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_BINARY_DIR
}
>
$<INSTALL_INTERFACE:include>
)
target_compile_features
(
eicd
PUBLIC cxx_auto_type
PUBLIC cxx_trailing_return_types
PRIVATE cxx_variadic_templates
PRIVATE cxx_std_17
)
PODIO_GENERATE_DICTIONARY
(
eicd
${
headers
}
SELECTION
${
CMAKE_CURRENT_BINARY_DIR
}
/src/selection.xml
OPTIONS --library
${
CMAKE_SHARED_LIBRARY_PREFIX
}
eicd
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
set_target_properties
(
eicd-dictgen PROPERTIES EXCLUDE_FROM_ALL TRUE
)
target_sources
(
eicd PRIVATE eicd.cxx
)
PODIO_ADD_ROOT_IO_DICT
(
eicdDict eicd
"
${
headers
}
"
src/selection.xml
OUTPUT_FOLDER
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_library
(
eicd::eicdDict ALIAS eicdDict
)
list
(
APPEND EICD_INSTALL_LIBS eicd eicdDict
)
add_subdirectory
(
utils
)
install
(
TARGETS
${
EICD_INSTALL_LIBS
}
EXPORT EICDTargets
RUNTIME DESTINATION
"
${
CMAKE_INSTALL_BINDIR
}
"
COMPONENT bin
LIBRARY DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
"
COMPONENT shlib
PUBLIC_HEADER DESTINATION
"
${
CMAKE_INSTALL_INCLUDEDIR
}
/eicd"
COMPONENT dev
)
install
(
DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/eicd
DESTINATION include
FILES_MATCHING PATTERN *.h
)
install
(
FILES
"
${
PROJECT_BINARY_DIR
}
/eicd/eicdDictDict.rootmap"
DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
"
COMPONENT dev
)
install
(
TARGETS eicd
EXPORT
${
PROJECT_NAME
}
Targets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
install
(
FILES
eic_data.yaml
DESTINATION
"
${
CMAKE_INSTALL_DATADIR
}
/eicd"
COMPONENT dev
)
install
(
FILES
"
${
PROJECT_BINARY_DIR
}
/eicdDict.rootmap"
"
${
PROJECT_BINARY_DIR
}
/libeicd_rdict.pcm"
DESTINATION lib
)
"
${
PROJECT_BINARY_DIR
}
/eicd/libeicdDict_rdict.pcm"
DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
"
COMPONENT dev
)
add_custom_target
(
doc_doxygen
#ALL
COMMAND doxygen
${
CMAKE_SOURCE_DIR
}
/docs/Doxyfile
...
...
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