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
ea548940
Verified
Commit
ea548940
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: pipeline
parent
557174bd
No related branches found
No related tags found
No related merge requests found
Pipeline
#9592
failed
3 years ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+3
-0
3 additions, 0 deletions
.gitignore
CMakeLists.txt
+12
-4
12 additions, 4 deletions
CMakeLists.txt
caosdbConfig.cmake
+0
-11
0 additions, 11 deletions
caosdbConfig.cmake
include/caosdb/utils.h
+10
-6
10 additions, 6 deletions
include/caosdb/utils.h
with
25 additions
and
21 deletions
.gitignore
+
3
−
0
View file @
ea548940
...
@@ -15,6 +15,9 @@ install_manifest.txt
...
@@ -15,6 +15,9 @@ install_manifest.txt
compile_commands.json
compile_commands.json
CTestTestfile.cmake
CTestTestfile.cmake
_deps
_deps
*Config.cmake
*ConfigVersion.cmake
# C
# C
## Prerequisites
## Prerequisites
...
...
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
12
−
4
View file @
ea548940
...
@@ -36,8 +36,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
...
@@ -36,8 +36,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set
(
CMAKE_MODULE_PATH
"
${
PROJECT_SOURCE_DIR
}
/cmake"
${
CMAKE_MODULE_PATH
}
)
set
(
CMAKE_MODULE_PATH
"
${
PROJECT_SOURCE_DIR
}
/cmake"
${
CMAKE_MODULE_PATH
}
)
# dependency management with conan
# dependency management with conan
include
(
${
CMAKE_BINARY_DIR
}
/conanbuildinfo.cmake
)
#
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup
()
#
conan_basic_setup()
set
(
PROJECT_INCLUDE_DIR
"
${
PROJECT_SOURCE_DIR
}
/include"
)
set
(
PROJECT_INCLUDE_DIR
"
${
PROJECT_SOURCE_DIR
}
/include"
)
...
@@ -126,6 +126,7 @@ add_library(caosdb_info_v1alpha1
...
@@ -126,6 +126,7 @@ add_library(caosdb_info_v1alpha1
${
hw_proto_srcs
}
${
hw_proto_srcs
}
${
hw_proto_hdrs
}
)
${
hw_proto_hdrs
}
)
target_link_libraries
(
caosdb_info_v1alpha1
target_link_libraries
(
caosdb_info_v1alpha1
${
CONAN_LIBS
}
${
_REFLECTION
}
${
_REFLECTION
}
${
_GRPC_GRPCPP
}
${
_GRPC_GRPCPP
}
${
_PROTOBUF_LIBPROTOBUF
}
)
${
_PROTOBUF_LIBPROTOBUF
}
)
...
@@ -241,5 +242,12 @@ install(FILES ${hw_grpc_hdrs} ${hw_proto_hdrs}
...
@@ -241,5 +242,12 @@ install(FILES ${hw_grpc_hdrs} ${hw_proto_hdrs}
install
(
FILES
${
PROJECT_SOURCE_DIR
}
/caosdbConfig.cmake
install
(
FILES
${
PROJECT_SOURCE_DIR
}
/caosdbConfig.cmake
DESTINATION
${
libcaosdb_CMAKE_DEST
}
)
DESTINATION
${
libcaosdb_CMAKE_DEST
}
)
#set_property(TARGET caosdb PROPERTY VERSION ${libcaosdb_VERSION})
include
(
CMakePackageConfigHelpers
)
write_basic_package_version_file
(
"
${
PROJECT_SOURCE_DIR
}
/caosdbConfigVersion.cmake"
VERSION
${
libcaosdb_VERSION
}
COMPATIBILITY AnyNewerVersion
)
install
(
FILES
${
PROJECT_SOURCE_DIR
}
/caosdbConfigVersion.cmake
DESTINATION
${
libcaosdb_CMAKE_DEST
}
)
This diff is collapsed.
Click to expand it.
caosdbConfig.cmake
deleted
100644 → 0
+
0
−
11
View file @
557174bd
get_filename_component
(
CAOSDB_CMAKE_DIR
"
${
CMAKE_CURRENT_LIST_FILE
}
"
PATH
)
include
(
CMakeFindDependencyMacro
)
find_dependency
(
Threads REQUIRED
)
find_dependency
(
Protobuf CONFIG REQUIRED
)
find_dependency
(
gRPC CONFIG REQUIRED
)
if
(
NOT TARGET caosdb::caosdb
)
include
(
"
${
CAOSDB_CMAKE_DIR
}
/caosdbTargets.cmake"
)
endif
()
This diff is collapsed.
Click to expand it.
include/caosdb/utils.h
+
10
−
6
View file @
ea548940
...
@@ -26,7 +26,9 @@
...
@@ -26,7 +26,9 @@
#include
<fstream>
#include
<fstream>
#include
<string>
#include
<string>
#include
<cstdlib>
#include
<cstdlib>
/*
#include <boost/beast/core/detail/base64.hpp>
#include <boost/beast/core/detail/base64.hpp>
*/
namespace
caosdb
::
utils
{
namespace
caosdb
::
utils
{
...
@@ -68,14 +70,16 @@ inline auto get_env_var(const std::string &key, const std::string &fall_back)
...
@@ -68,14 +70,16 @@ inline auto get_env_var(const std::string &key, const std::string &fall_back)
* @brief Encode string as base64
* @brief Encode string as base64
*/
*/
inline
auto
base64_encode
(
const
std
::
string
&
plain
)
->
std
::
string
{
inline
auto
base64_encode
(
const
std
::
string
&
plain
)
->
std
::
string
{
auto
size_plain
=
plain
.
size
();
return
std
::
string
(
"YWRtaW46Y2Fvc2Ri"
);
auto
size_encoded
=
boost
::
beast
::
detail
::
base64
::
encoded_size
(
size_plain
);
// TODO
// auto size_plain = plain.size();
// auto size_encoded = boost::beast::detail::base64::encoded_size(size_plain);
char
encoded
[
size_encoded
];
//
char encoded[size_encoded];
boost
::
beast
::
detail
::
base64
::
encode
(
&
encoded
,
plain
.
c_str
(),
size_plain
);
//
boost::beast::detail::base64::encode(&encoded, plain.c_str(), size_plain);
// the encoded char[] is not null terminated, so explicitely set the length
//
//
the encoded char[] is not null terminated, so explicitely set the length
return
std
::
string
(
encoded
,
encoded
+
size_encoded
);
//
return std::string(encoded, encoded + size_encoded);
}
}
}
// namespace caosdb::utils
}
// namespace caosdb::utils
...
...
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