Skip to content
Snippets Groups Projects
Verified Commit ea548940 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: pipeline

parent 557174bd
No related branches found
No related tags found
No related merge requests found
Pipeline #9592 failed
...@@ -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
......
...@@ -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})
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()
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment