Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
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
Harbor 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
dCache
cta
Commits
5372910c
Commit
5372910c
authored
3 years ago
by
Tigran Mkrtchyan
Browse files
Options
Downloads
Patches
Plain Diff
cta-dcache: minimise integration into other modules
parent
906cb9a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cta-dcache/gRPC/CMakeLists.txt
+35
-4
35 additions, 4 deletions
cta-dcache/gRPC/CMakeLists.txt
eos_cta/CMakeLists.txt
+2
-18
2 additions, 18 deletions
eos_cta/CMakeLists.txt
with
37 additions
and
22 deletions
cta-dcache/gRPC/CMakeLists.txt
+
35
−
4
View file @
5372910c
...
...
@@ -16,14 +16,45 @@
cmake_minimum_required
(
VERSION 2.6
)
find_package
(
Protobuf3 REQUIRED
)
find_package
(
GRPC REQUIRED
)
include_directories
(
${
CMAKE_BINARY_DIR
}
/eos_cta
include_directories
(
${
PROTOBUF3_INCLUDE_DIRS
}
)
set
(
PROTOBUF_CTADCACHE_DIR
${
PROJECT_SOURCE_DIR
}
/cta-dcache/grpc-proto/protobuf
)
file
(
GLOB ProtoFilesCtaDcache
"
${
PROTOBUF_CTADCACHE_DIR
}
/*.proto"
)
# depends on CTA_EOS definitions
set
(
PROTOBUF_EOS_CTA_DIR
${
XRD_SSI_PB_DIR
}
/eos_cta/protobuf
)
file
(
GLOB ProtoFilesEosCta
"
${
PROTOBUF_EOS_CTA_DIR
}
/*.proto"
)
set
(
PROTOBUF3_INCLUDE_PATH
"
${
PROTOBUF_EOS_CTA_DIR
}
:
${
PROTOBUF_CTADCACHE_DIR
}
:
${
PROTOBUF3_INCLUDE_DIRS
}
"
)
PROTOBUF3_GENERATE_CPP
(
ProtoSourcesCtaDcache ProtoHeadersCtaDcache
${
ProtoFilesCtaDcache
}
)
set
(
GRPC_PROTOBUF_PATH
"
${
CMAKE_BINARY_DIR
}
/cta-dcache/gRPC"
)
set
(
PROTOBUF3_IMPORT_DIRS
"
${
PROTOBUF_EOS_CTA_DIR
}
:
${
PROTOBUF3_INCLUDE_DIRS
}
"
)
grpc_generate_cpp
(
ProtoGrpcSourcesCtaDcache ProtoGrpcHeadersCtaDcache
${
GRPC_PROTOBUF_PATH
}
${
ProtoFilesCtaDcache
}
)
set_source_files_properties
(
${
ProtoSourcesCtaDcache
}
${
ProtoHeadersCtaDcache
}
${
ProtoGrpcSourcesCtaDcache
}
${
ProtoGrpcHeadersCtaDcache
}
PROPERTIES GENERATED TRUE
)
foreach
(
PROTO_SRC
${
ProtoSourcesCtaDcache
}
${
ProtoGrpcSourcesCtaDcache
}
)
set_property
(
SOURCE
${
PROTO_SRC
}
PROPERTY COMPILE_FLAGS
" -Wno-missing-field-initializers -fPIC -Wno-narrowing -Wno-implicit-fallthrough"
)
# Add -Wno-narrowing -Wno-implicit-fallthrough compiler flags if using gcc version 7 or greater
if
(
CMAKE_COMPILER_IS_GNUCC
)
if
(
GCC_VERSION VERSION_EQUAL 7 OR GCC_VERSION VERSION_GREATER 7
)
set_property
(
SOURCE
${
PROTO_SRC
}
APPEND_STRING PROPERTY COMPILE_FLAGS
" -Wno-narrowing -Wno-implicit-fallthrough"
)
endif
(
GCC_VERSION VERSION_EQUAL 7 OR GCC_VERSION VERSION_GREATER 7
)
endif
(
CMAKE_COMPILER_IS_GNUCC
)
endforeach
(
PROTO_SRC
)
include_directories
(
${
CMAKE_BINARY_DIR
}
/cta-dcache/gRPC
${
CMAKE_BINARY_DIR
}
/eos_cta
${
PROTOBUF3_INCLUDE_DIRS
}
)
add_executable
(
cta-dcache FrontendGRpcSvc.cpp
)
add_executable
(
cta-dcache FrontendGRpcSvc.cpp
${
ProtoSourcesCtaDcache
}
${
ProtoGrpcSourcesCtaDcache
}
)
target_link_libraries
(
cta-dcache CtaGRpc
${
PROTOBUF3_LIBRARIES
}
${
GRPC_GRPC++_LIBRARY
}
target_link_libraries
(
cta-dcache
${
PROTOBUF3_LIBRARIES
}
${
GRPC_GRPC++_LIBRARY
}
ctascheduler ctacommon ctaobjectstore ctacatalogue
)
set_property
(
TARGET cta-dcache APPEND PROPERTY INSTALL_RPATH
${
PROTOBUF3_RPATH
}
)
...
...
This diff is collapsed.
Click to expand it.
eos_cta/CMakeLists.txt
+
2
−
18
View file @
5372910c
...
...
@@ -24,31 +24,23 @@ set(PROTOBUF_EOS_CTA_DIR ${XRD_SSI_PB_DIR}/eos_cta/protobuf)
file
(
GLOB ProtoFilesEosCta
"
${
PROTOBUF_EOS_CTA_DIR
}
/*.proto"
)
set
(
PROTOBUF_MIGRATION_DIR
${
PROJECT_SOURCE_DIR
}
/migration/grpc-proto/protobuf
)
file
(
GLOB ProtoFilesMigration
"
${
PROTOBUF_MIGRATION_DIR
}
/*.proto"
)
set
(
PROTOBUF_FRONTEND_DIR
${
PROJECT_SOURCE_DIR
}
/cta-dcache/grpc-proto/protobuf
)
file
(
GLOB ProtoFilesFrontendCta
"
${
PROTOBUF_FRONTEND_DIR
}
/*.proto"
)
# Compile protobufs
set
(
PROTOBUF3_INCLUDE_PATH
${
PROTOBUF_EOS_CTA_DIR
}
:
${
PROTOBUF_MIGRATION_DIR
}
:
${
PROTOBUF_FRONTEND_DIR
}
:
${
PROTOBUF3_INCLUDE_DIRS
}
)
set
(
PROTOBUF3_INCLUDE_PATH
${
PROTOBUF_EOS_CTA_DIR
}
:
${
PROTOBUF_MIGRATION_DIR
}
)
PROTOBUF3_GENERATE_CPP
(
ProtoSourcesEosCta ProtoHeadersEosCta
${
ProtoFilesEosCta
}
)
PROTOBUF3_GENERATE_CPP
(
ProtoSourcesMigration ProtoHeadersMigration
${
ProtoFilesMigration
}
)
PROTOBUF3_GENERATE_CPP
(
ProtoSourcesFrontendCta ProtoHeadersFrontendCta
${
ProtoFilesFrontendCta
}
)
# Compile gRPC code
set
(
GRPC_PROTOBUF_PATH
"
${
CMAKE_BINARY_DIR
}
/eos_cta/"
)
grpc_generate_cpp
(
ProtoGrpcSourcesMigration ProtoGrpcHeadersMigration
${
GRPC_PROTOBUF_PATH
}
${
ProtoFilesMigration
}
)
# depends on CTA_EOS definitions
set
(
PROTOBUF3_IMPORT_DIRS
"
${
PROTOBUF_EOS_CTA_DIR
}
:
${
PROTOBUF3_INCLUDE_DIRS
}
"
)
grpc_generate_cpp
(
ProtoGrpcSourcesFrontendCta ProtoGrpcHeadersFrontendCta
${
GRPC_PROTOBUF_PATH
}
${
ProtoFilesFrontendCta
}
)
set_source_files_properties
(
${
ProtoSourcesEosCta
}
${
ProtoHeadersEosCta
}
${
ProtoSourcesMigration
}
${
ProtoHeadersMigration
}
${
ProtoGrpcSourcesMigration
}
${
ProtoGrpcHeadersMigration
}
${
ProtoSourcesFrontendCta
}
${
ProtoHeadersFrontendCta
}
${
ProtoGrpcSourcesFrontendCta
}
${
ProtoGrpcHeadersFrontendCta
}
PROPERTIES GENERATED TRUE
)
foreach
(
PROTO_SRC
${
ProtoSourcesEosCta
}
${
ProtoSourcesMigration
}
${
ProtoGrpcSourcesMigration
}
${
ProtoSourcesFrontendCta
}
${
ProtoGrpcSourcesFrontendCta
}
)
foreach
(
PROTO_SRC
${
ProtoSourcesEosCta
}
${
ProtoSourcesMigration
}
${
ProtoGrpcSourcesMigration
}
)
set_property
(
SOURCE
${
PROTO_SRC
}
PROPERTY COMPILE_FLAGS
" -Wno-missing-field-initializers -fPIC -Wno-narrowing -Wno-implicit-fallthrough"
)
endforeach
(
PROTO_SRC
)
...
...
@@ -63,11 +55,3 @@ set_target_properties(EosMigration PROPERTIES
LINKER_LANGUAGE CXX
POSITION_INDEPENDENT_CODE TRUE
)
target_link_libraries
(
EosMigration
${
PROTOBUF3_GRPC_LIBRARIES
}
)
add_library
(
CtaGRpc
${
ProtoSourcesFrontendCta
}
${
ProtoGrpcSourcesFrontendCta
}
)
set_target_properties
(
CtaGRpc PROPERTIES
LINKER_LANGUAGE CXX
POSITION_INDEPENDENT_CODE TRUE
)
target_link_libraries
(
CtaGRpc
${
PROTOBUF3_GRPC_LIBRARIES
}
)
add_dependencies
(
CtaGRpc XrdSsiPbEosCta
)
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