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
0f9cb894
Commit
0f9cb894
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: updated cmake with user-facing podio macros (NEEDS podio > 0.14.3)
parent
c39114fe
Branches
Branches containing commit
No related tags found
1 merge request
!89
feat: updated cmake with user-facing podio macros (NEEDS podio > 0.14.3)
Pipeline
#35825
failed
2 years ago
Stage: config
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+27
-39
27 additions, 39 deletions
CMakeLists.txt
utils/CMakeLists.txt
+1
-15
1 addition, 15 deletions
utils/CMakeLists.txt
with
28 additions
and
54 deletions
CMakeLists.txt
+
27
−
39
View file @
0f9cb894
...
@@ -13,6 +13,7 @@ if(APPLE)
...
@@ -13,6 +13,7 @@ if(APPLE)
set
(
CMAKE_SHARED_LIBRARY_SUFFIX
".so"
)
set
(
CMAKE_SHARED_LIBRARY_SUFFIX
".so"
)
endif
(
APPLE
)
endif
(
APPLE
)
include
(
GNUInstallDirs
)
find_package
(
podio 0.15 REQUIRED
)
find_package
(
podio 0.15 REQUIRED
)
include_directories
(
${
podio_INCLUDE_DIR
}
)
include_directories
(
${
podio_INCLUDE_DIR
}
)
...
@@ -22,60 +23,47 @@ find_package(EDM4HEP 0.4.1 REQUIRED)
...
@@ -22,60 +23,47 @@ find_package(EDM4HEP 0.4.1 REQUIRED)
#include(cmake/root.cmake)
#include(cmake/root.cmake)
list
(
APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS}
)
list
(
APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS}
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
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
}
)
include
(
${
ROOT_USE_FILE
}
)
PODIO_GENERATE_DATAMODEL
(
eicd eic_data.yaml headers sources
PODIO_GENERATE_DATAMODEL
(
eicd eic_data.yaml headers sources
UPSTREAM_EDM edm4hep:
${
EDM4HEP_DATA_DIR
}
/edm4hep.yaml
UPSTREAM_EDM edm4hep:
${
EDM4HEP_DATA_DIR
}
/edm4hep.yaml
IO_BACKEND_HANDLERS
${
PODIO_IO_HANDLERS
}
OUTPUT_FOLDER
${
CMAKE_CURRENT_BINARY_DIR
}
OUTPUT_FOLDER
${
CMAKE_CURRENT_BINARY_DIR
}
)
)
add_library
(
eicd SHARED
PODIO_ADD_DATAMODEL_CORE_LIB
(
eicd
"
${
headers
}
"
"
${
sources
}
"
${
sources
}
OUTPUT_FOLDER
${
CMAKE_CURRENT_BINARY_DIR
}
)
)
target_link_libraries
(
eicd
PODIO_ADD_ROOT_IO_DICT
(
eicdDict eicd
"
${
headers
}
"
src/selection.xml
PUBLIC EDM4HEP::edm4hep
OUTPUT_FOLDER
${
CMAKE_CURRENT_BINARY_DIR
}
PUBLIC podio::podio
)
PUBLIC ROOT::Core
)
add_library
(
eicd::eicdDict ALIAS eicdDict
)
target_include_directories
(
eicd
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_BINARY_DIR
}
>
list
(
APPEND EICD_INSTALL_LIBS eicd eicdDict
)
$<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
)
add_subdirectory
(
utils
)
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
install
(
FILES
DESTINATION include
"
${
PROJECT_BINARY_DIR
}
/eicdDictDict.rootmap"
FILES_MATCHING PATTERN *.h
DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
"
COMPONENT dev
)
)
install
(
TARGETS eicd
install
(
FILES
EXPORT
${
PROJECT_NAME
}
Targets
eic_data.yaml
LIBRARY DESTINATION lib
DESTINATION
"
${
CMAKE_INSTALL_DATADIR
}
/eicd"
COMPONENT dev
)
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
install
(
FILES
install
(
FILES
"
${
PROJECT_BINARY_DIR
}
/eicdDict.rootmap"
"
${
PROJECT_BINARY_DIR
}
/libeicdDict_rdict.pcm"
"
${
PROJECT_BINARY_DIR
}
/libeicd_rdict.pcm"
DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
"
COMPONENT dev
)
DESTINATION lib
)
add_custom_target
(
doc_doxygen
#ALL
add_custom_target
(
doc_doxygen
#ALL
COMMAND doxygen
${
CMAKE_SOURCE_DIR
}
/docs/Doxyfile
COMMAND doxygen
${
CMAKE_SOURCE_DIR
}
/docs/Doxyfile
...
...
This diff is collapsed.
Click to expand it.
utils/CMakeLists.txt
+
1
−
15
View file @
0f9cb894
find_package
(
ROOT REQUIRED COMPONENTS GenVector MathCore
)
find_package
(
ROOT REQUIRED COMPONENTS GenVector MathCore
)
#ROOT_GENERATE_DICTIONARY(G__NPDetGeoCad
# include/TGeoToStep.h
# OPTIONS -I${OpenCASCADE_INCLUDE_DIR}
# OPTIONS -I${CMAKE_CURRENT_SOURCE_DIR}
# OPTIONS -I${CMAKE_CURRENT_SOURCE_DIR}/include
# OPTIONS -I${CMAKE_CURRENT_SOURCE_DIR}/src
# LINKDEF include/LinkDef.h
# )
#add_custom_target(G__NPDetGeoCad_ROOTDICT DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/G__NPDetGeoCad.cxx)
add_library
(
eicd_utils SHARED
add_library
(
eicd_utils SHARED
src/utils.cxx
src/utils.cxx
)
)
...
@@ -29,6 +19,7 @@ target_compile_options(eicd_utils PRIVATE
...
@@ -29,6 +19,7 @@ target_compile_options(eicd_utils PRIVATE
target_link_libraries
(
eicd_utils
target_link_libraries
(
eicd_utils
PUBLIC eicd
PUBLIC eicd
PUBLIC EDM4HEP::edm4hep
PUBLIC ROOT::GenVector ROOT::MathCore
)
PUBLIC ROOT::GenVector ROOT::MathCore
)
target_include_directories
(
eicd_utils
target_include_directories
(
eicd_utils
...
@@ -43,11 +34,6 @@ install(FILES
...
@@ -43,11 +34,6 @@ install(FILES
include/eicd/vector_utils_legacy.h
include/eicd/vector_utils_legacy.h
DESTINATION include/eicd
DESTINATION include/eicd
)
)
#install(FILES
# "${CMAKE_CURRENT_BINARY_DIR}/libNPDetGeoCad.rootmap"
# "${CMAKE_CURRENT_BINARY_DIR}/libNPDetGeoCad_rdict.pcm"
# DESTINATION lib)
install
(
TARGETS eicd_utils
install
(
TARGETS eicd_utils
EXPORT
${
PROJECT_NAME
}
Targets
EXPORT
${
PROJECT_NAME
}
Targets
...
...
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