Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
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
Code review analytics
Issue 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
caosdb
Software
caosdb-cpplib
Commits
078ad20c
Verified
Commit
078ad20c
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: conan
parent
b4807aad
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#9531
failed
3 years ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+18
-14
18 additions, 14 deletions
CMakeLists.txt
conanfile.txt
+0
-5
0 additions, 5 deletions
conanfile.txt
with
18 additions
and
19 deletions
CMakeLists.txt
+
18
−
14
View file @
078ad20c
...
...
@@ -69,12 +69,12 @@ set_target_properties(caosdb PROPERTIES
CXX_CLANG_TIDY
"
${
_CMAKE_CXX_CLANG_TIDY
}
"
CXX_INCLUDE_WHAT_YOU_USE
"
${
_CMAKE_CXX_INCLUDE_WHAT_YOU_USE
}
"
)
#
add_executable(caosdbcli src/caosdbcli.cpp)
#
set_target_properties(caosdbcli PROPERTIES
#
CXX_CLANG_TIDY "${_CMAKE_CXX_CLANG_TIDY}"
#
CXX_INCLUDE_WHAT_YOU_USE "${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE}"
#
)
#
target_link_libraries(caosdbcli caosdb
caosdb_info_v1alpha1 ${CONAN_LIBS}
)
add_executable
(
caosdbcli src/caosdbcli.cpp
)
set_target_properties
(
caosdbcli PROPERTIES
CXX_CLANG_TIDY
"
${
_CMAKE_CXX_CLANG_TIDY
}
"
CXX_INCLUDE_WHAT_YOU_USE
"
${
_CMAKE_CXX_INCLUDE_WHAT_YOU_USE
}
"
)
target_link_libraries
(
caosdbcli caosdb
)
if
(
"
${
CMAKE_BUILD_TYPE
}
"
MATCHES
"Debug"
)
# supress warnings during build of gtest
...
...
@@ -89,8 +89,8 @@ endif()
## CODE GENERATION
#
option(GRPC_FETCHCONTENT "Fetch and build GRPC from the sources" OFF)
#
include(FetchGRPC)
option
(
GRPC_FETCHCONTENT
"Fetch and build GRPC from the sources"
OFF
)
include
(
FetchGRPC
)
#
# Protobuf/Grpc source files
...
...
@@ -109,11 +109,11 @@ set(hw_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/${hw_hdrs_path}/mai
set
(
hw_grpc_hdrs
"
${
CMAKE_CURRENT_BINARY_DIR
}
/include/caosdb/
${
hw_hdrs_path
}
/main.grpc.pb.h"
)
add_custom_command
(
OUTPUT
"
${
hw_proto_srcs
}
"
"
${
hw_proto_hdrs
}
"
"
${
hw_grpc_srcs
}
"
"
${
hw_grpc_hdrs
}
"
COMMAND
${
CMAKE_BINARY_DIR
}
/build_tools/protoc
COMMAND
${
_PROTOBUF_PROTOC
}
ARGS --grpc_out
"
${
CMAKE_CURRENT_BINARY_DIR
}
/include"
--cpp_out
"
${
CMAKE_CURRENT_BINARY_DIR
}
/include"
-I
"
${
PROTO_PATH
}
"
--plugin=protoc-gen-grpc=
"
${
CMAKE_BINARY_DIR
}
/build_tools/grpc_cpp_plugin
"
--plugin=protoc-gen-grpc=
"
${
_GRPC_CPP_PLUGIN_EXECUTABLE
}
"
"
${
PROTO_FILES
}
"
DEPENDS
"
${
PROTO_FILES
}
"
)
...
...
@@ -126,7 +126,9 @@ add_library(caosdb_info_v1alpha1
${
hw_proto_srcs
}
${
hw_proto_hdrs
}
)
target_link_libraries
(
caosdb_info_v1alpha1
${
CONAN_LIBS
}
)
${
_REFLECTION
}
${
_GRPC_GRPCPP
}
${
_PROTOBUF_LIBPROTOBUF
}
)
target_include_directories
(
caosdb_info_v1alpha1 PUBLIC
# headers to include when building from source
$<BUILD_INTERFACE:
${
libcaosdb_SOURCE_DIR
}
/include>
...
...
@@ -135,8 +137,10 @@ target_include_directories(caosdb_info_v1alpha1 PUBLIC
)
target_link_libraries
(
caosdb
caosdb_info_v1alpha1
${
CONAN_LIBS
}
)
caosdb_info_v1alpha1
${
_REFLECTION
}
${
_GRPC_GRPCPP
}
${
_PROTOBUF_LIBPROTOBUF
}
)
###############################################
...
...
@@ -193,7 +197,7 @@ install(
TARGETS
caosdb
caosdb_info_v1alpha1
#
${
CONAN_LIBS
_GRPC}
${
_GRPC
_DEPS
}
# name of the CMake "export group" containing the targets we want to install
EXPORT caosdbTargets
# Dynamic, static library and include destination locations after running
...
...
This diff is collapsed.
Click to expand it.
conanfile.txt
+
0
−
5
View file @
078ad20c
[requires]
boost/1.76.0
grpc/1.38.0
[generators]
cmake
[imports]
bin, protoc* -> ./build_tools
bin, grpc_cpp_plugin* -> ./build_tools
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