feat/support_orm (#1)
All checks were successful
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Successful in 1m17s
linux-mips64-gcc / linux-gcc-mips64el (push) Successful in 1m39s
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Successful in 1m42s
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Successful in 1m53s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Successful in 1m56s
linux-x64-gcc / linux-gcc (push) Successful in 2m12s
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Successful in 3m41s

Co-authored-by: tqcq <99722391+tqcq@users.noreply.github.com>
Reviewed-on: #1
This commit is contained in:
tqcq 2024-01-06 13:01:43 +00:00
parent bb4d3c68be
commit aba94bb9eb
7 changed files with 15 additions and 3 deletions

View File

@ -93,5 +93,5 @@ jobs:
run: |
cd ${{ github.workspace }}
sudo apt-get update
sudo apt-get install -y libarchive-dev libssl-dev autoconf libtool pkg-config cmake make gcc g++
sudo apt-get install -y libarchive-dev libssl-dev autoconf libtool pkg-config cmake make gcc g++ git
${{ env.build_command }}

View File

@ -79,7 +79,7 @@ jobs:
run: |
cd ${{ github.workspace }}
sudo apt-get update
sudo apt-get install -y libarchive-dev libssl-dev autoconf libtool pkg-config cmake make gcc g++
sudo apt-get install -y libarchive-dev libssl-dev autoconf libtool pkg-config cmake make gcc g++ git
cmake . -Bbuild -DCMAKE_TOOLCHAIN_FILE=toolchains/hisiv500.toolchain.cmake -DULIB_BUILD_TESTS=OFF -DCMAKE_CROSSCOMPILING_EMULATOR="qemu-arm;-L;/opt/hisi-linux/x86-arm/arm-hisiv500-linux/"
cmake --build build --target all -- -j `nproc`

4
.gitmodules vendored
View File

@ -2,3 +2,7 @@
path = 3party/googletest
url = https://code.uocat.com/3party/googletest
branch = release-1.7.0
[submodule "3party/sqlpp11"]
path = 3party/sqlpp11
url = https://code.uocat.com/3party/sqlpp11
branch = 0.64

1
3party/sqlpp11 Submodule

@ -0,0 +1 @@
Subproject commit 7f04435576036fc3f06d929760b5c7623485f069

View File

@ -68,6 +68,7 @@ set(FMT_USE_CPP11 OFF CACHE BOOL "Use C++11" FORCE)
set(FMT_TEST OFF CACHE BOOL "Build tests" FORCE)
set(FMT_USE_CPP11 OFF CACHE BOOL "Use C++11" FORCE)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3party/fmt)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3party/sqlpp11)
set(JSONCPP_WITH_TESTS OFF)
set(JSONCPP_WITH_POST_BUILD_UNITTEST OFF)
@ -82,7 +83,7 @@ target_sources(${PROJECT_NAME} PRIVATE
src/ulib/log/log.cpp
src/ulib/log/level.cpp
)
target_link_libraries(${PROJECT_NAME} PUBLIC fmt::fmt jsoncpp_static)
target_link_libraries(${PROJECT_NAME} PUBLIC fmt::fmt jsoncpp_static sqlpp11::sqlpp11)
target_compile_definitions(${PROJECT_NAME} PRIVATE ULIB_LIBRARY_IMPL)
target_include_directories(${PROJECT_NAME} PUBLIC
3party/inja

View File

@ -0,0 +1,5 @@
#include <gtest/gtest.h>
#include <sqlpp11/select.h>
#include <sqlpp11/alias_provider.h>
TEST(sqlpp11, select) { select(sqlpp::value(false).as(sqlpp::alias::a)); }

View File

@ -14,6 +14,7 @@ add_executable(ulib_test
ulib/system/timer_unittest.cpp
3party/inja/inja_unittest.cpp
3party/optional/optional_unittest.cpp
3party/sqlpp11/sqlpp11_unittest.cpp
ulib/utils/defer_unittest.cpp
)
target_link_libraries(ulib_test PRIVATE