Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
Template
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
规范查询wiki:
http://gitlab.anweitech.com/root/AW-Project-Manage/wikis/pages
Open sidebar
周尚
Template
Commits
d3b45b62
提交
d3b45b62
authored
1月 15, 2021
作者:
周尚
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
init
上级
流水线
#214
已取消 于阶段
变更
4
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
197 行增加
和
0 行删除
+197
-0
.gitlab-ci.yml
.gitlab-ci.yml
+43
-0
CMakeLists.txt
CMakeLists.txt
+57
-0
rsync.sh
rsync.sh
+23
-0
run.sh
run.sh
+74
-0
没有找到文件。
.gitlab-ci.yml
0 → 100644
浏览文件 @
d3b45b62
before_script
:
-
echo "Before script section"
after_script
:
-
echo "After script section"
-
yes | cp -a lib /usr/data/sharedFolders/
linux
:
stage
:
build
tags
:
-
linux
script
:
-
echo "start make linux"
-
find /usr/data/sharedFolders/lib/linux -name libAWSQLite* -delete
-
sh run.sh linux
hisiv510
:
stage
:
build
tags
:
-
hisiv510
script
:
-
echo "start make hisiv510"
-
find /usr/data/sharedFolders/lib/hisiv510 -name libAWSQLite* -delete
-
sh run.sh hisiv510
# himix200:
# stage: build
# tags:
# - himix200
# script:
# - echo "start make himix200"
# - find /usr/data/sharedFolders/lib/himix200 -name libAWSQLite* -delete
# - sh run.sh himix200
openwrt
:
stage
:
build
tags
:
-
openwrt
script
:
-
echo "start make openwrt"
-
find /usr/data/sharedFolders/lib/openwrt -name libAWSQLite* -delete
-
sh run.sh openwrt
CMakeLists.txt
0 → 100644
浏览文件 @
d3b45b62
cmake_minimum_required
(
VERSION 3.0
)
project
(
AW-SQLite
)
if
(
CMAKE_BUILD_TYPE MATCHES
"DEBUG"
)
add_definitions
(
-g -DDEBUG -rdynamic
)
endif
()
add_definitions
(
-D_GNU_SOURCE -std=c11 -Og
)
set
(
CMAKE_EXPORT_COMPILE_COMMANDS ON
)
set
(
CMAKE_VERBOSE_MAKEFILE ON
)
set
(
PROJECT_VERSION_MAJOR 2
)
set
(
PROJECT_VERSION_MINOR 1
)
set
(
PROJECT_VERSION_PATCH 0
)
set
(
PROJECT_RELEASE_CANDIDATE 0
)
set
(
PROJECT_VERSION
"
${
PROJECT_VERSION_MAJOR
}
.
${
PROJECT_VERSION_MINOR
}
.
${
PROJECT_VERSION_PATCH
}
"
)
if
(
NOT PROJECT_RELEASE_CANDIDATE STREQUAL
"0"
)
set
(
PROJECT_VERSION
${
PROJECT_VERSION
}
-rc
${
PROJECT_RELEASE_CANDIDATE
}
)
endif
()
set
(
PROJECT_SOURCE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
)
if
(
${
CMAKE_C_COMPILER
}
MATCHES
"hisiv510"
)
set
(
PLATFORM
"hisiv510"
)
elseif
(
${
CMAKE_C_COMPILER
}
MATCHES
"himix200"
)
set
(
PLATFORM
"himix200"
)
link_directories
(
/root/lib
)
elseif
(
${
CMAKE_C_COMPILER
}
MATCHES
"openwrt"
)
set
(
PLATFORM
"openwrt"
)
else
()
set
(
CMAKE_C_COMPILER cc
)
set
(
PLATFORM
"linux"
)
endif
()
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
${
PROJECT_SOURCE_DIR
}
/bin/
${
PLATFORM
}
)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
PROJECT_SOURCE_DIR
}
/lib/
${
PLATFORM
}
)
link_directories
(
lib/
${
PLATFORM
}
/usr/data/sharedFolders/lib/
${
PLATFORM
}
)
include_directories
(
include
)
aux_source_directory
(
src _src_dir
)
add_library
(
AWSQLite SHARED
${
_src_dir
}
)
target_link_libraries
(
AWSQLite AWString sqlite3 dl pthread
)
add_executable
(
tests test/tests.c
)
target_link_libraries
(
tests AWSQLite sqlite3
)
enable_testing
()
add_test
(
NAME testlist
COMMAND
${
PROJECT_SOURCE_DIR
}
/bin/
${
PLATFORM
}
/tests
"-l"
)
add_test
(
NAME testsql
COMMAND
${
PROJECT_SOURCE_DIR
}
/bin/
${
PLATFORM
}
/tests
"-s"
)
set_target_properties
(
AWSQLite PROPERTIES VERSION
${
PROJECT_VERSION
}
)
rsync.sh
0 → 100755
浏览文件 @
d3b45b62
#!/usr/bin/env bash
set
-e
# NOTICE: rsync is required (both client and server)
# config
r_user
=
root
r_host
=
192.168.0.82
r_port
=
10010
r_path
=
"/usr/data/zs/
$(
basename
$(
dirname
$(
realpath
$0
)))
"
PROJECT_DIR
=
${
PWD
%/sh
}
/
cd
${
PROJECT_DIR
}
if
[
-e
.git
]
&&
[
-e
.gitignore
]
;
then
cmd
=
"rsync -avzu -e 'ssh -p
$r_port
'
$PROJECT_DIR
\"
$r_user
@
$r_host
:
$r_path
\"
--exclude-from=.gitignore --exclude=.git --exclude=Doxyfile --exclude=API.org --exclude=README.org --exclude=.*"
else
cmd
=
"rsync -avzu -e 'ssh -p
$r_port
' CMakeLists.txt include src lib test tests.db
\"
$r_user
@
$r_host
:
${
r_path
}
\"
"
fi
echo
$cmd
eval
$cmd
run.sh
0 → 100644
浏览文件 @
d3b45b62
#!/usr/bin/env bash
USAGE
=
"Usage:
$0
Platform (linux/hisiv510/openwrt/himix200)"
usage
()
{
echo
$USAGE
exit
}
# cross compile system
system[0]
=
"linux"
system[1]
=
"himix200"
system[2]
=
"openwrt"
system[3]
=
"hisiv510"
# projects depended on this lib
# set cmake args
CMAKE_C_COMPILER
=
cmake_set_compiler
()
{
case
$1
in
hisiv510
)
CMAKE_C_COMPILER
=
arm-hisiv510-linux-gcc
;;
linux
)
CMAKE_C_COMPILER
=
gcc
;;
openwrt
)
CMAKE_C_COMPILER
=
mipsel-openwrt-linux-gcc
;;
himix200
)
CMAKE_C_COMPILER
=
arm-himix200-linux-gcc
;;
*
)
usage
;;
esac
}
cmake_do_it
()
{
cmd
=
"find lib/
$1
-name libAWString* -delete"
echo
$cmd
eval
$cmd
cmd
=
"cmake -H. -Bbuild -DCMAKE_C_COMPILER=
${
CMAKE_C_COMPILER
}
-DCMAKE_BUILD_TYPE=DEBUG"
echo
$cmd
eval
$cmd
cmd
=
"cmake --build build --clean-first"
echo
$cmd
eval
$cmd
}
# cmake_do_all ()
# {
# for sys in ${system[@]}
# do
# echo $sys
# cmake_set_compiler $sys
# cmake_do_it
# done
# }
# cmake_do_all
cmake_set_compiler
$1
cmake_do_it
$1
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论