forked from azadkuh/qhttp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
499786e
commit f7fc160
Showing
13 changed files
with
3,415 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ build/ | |
docs/ | ||
res/keys | ||
res/ | ||
vendor | ||
build.properties | ||
commit-* | ||
TODO.md | ||
|
||
# vim/neovim / YouCompleteMe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
config.job=2 | ||
config.qtversion=5 | ||
config.qompotercmd=./qompoter.sh | ||
config.qmakecmd=qmake-qt${config.qtversion} | ||
config.makecmd=make | ||
config.qompoterrepo=/Project/PlateformeVehiculeElectrique/qompoter | ||
config.os=linux | ||
config.arch=64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project name="qhttp" default="build"> | ||
<property name="appname" value="${ant.project.name}" /> | ||
<property name="workspace" value="${basedir}/build-ant" /> | ||
<property name="sourcedir" value="${basedir}/src" /> | ||
<property name="builddir" value="${workspace}" /> | ||
<property name="docdir" value="${basedir}/docs/${appname}" /> | ||
<property file="build.properties.dist"/> | ||
|
||
<target name="prebuild" depends="prepare,qompoter"/> | ||
<target name="build" depends="qmake,make"/> | ||
<target name="build-test" depends="qmake,make,unittest"/> | ||
<target name="build-ci" depends="clean,prebuild,build,install,cppcheck"/> | ||
|
||
<target name="clean" description="Cleanup build artifacts"> | ||
<delete dir="${basedir}/vendor" /> | ||
<delete dir="${builddir}" /> | ||
<delete dir="${builddir}/unittest" /> | ||
<delete dir="${builddir}/coverage" /> | ||
<delete dir="${builddir}/cppcheck" /> | ||
<delete dir="${docdir}" /> | ||
</target> | ||
|
||
<target name="prepare" description="Prepare for build"> | ||
<mkdir dir="${builddir}/unittest" /> | ||
<mkdir dir="${builddir}/coverage" /> | ||
<mkdir dir="${builddir}/cppcheck" /> | ||
<mkdir dir="${builddir}/../docs" /> | ||
<mkdir dir="${docdir}" /> | ||
<exec executable="${config.qmakecmd}"> | ||
<arg value="--version" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="qompoter" description="Retrieve dependencies"> | ||
<exec executable="${config.qompotercmd}" dir="${basedir}" failonerror="true"> | ||
<arg value="install" /> | ||
<arg value="--repo" /> | ||
<arg value="${config.qompoterrepo}" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="qmake" description="Prebuild"> | ||
<exec executable="${config.qmakecmd}" dir="${builddir}" failonerror="true"> | ||
<arg value="../${appname}.pro" /> | ||
<arg value="-r" /> | ||
<arg value="-spec" /> | ||
<arg value="${config.os}-g++-${config.arch}" /> | ||
<arg value="EXPORT_PATH_PREFIX=${config.qompoterrepo}" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="make" description="Build"> | ||
<exec executable="${config.makecmd}" dir="${builddir}" failonerror="true"> | ||
<arg value="-j" /> | ||
<arg value="${config.job}" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="install" description="Install"> | ||
<exec executable="${config.makecmd}" dir="${builddir}" failonerror="true"> | ||
<arg value="install" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="unittest" description="Run unit tests with QTestLib"> | ||
<exec | ||
executable="./${appname}" | ||
dir="${builddir}/test/release/build_${config.os}_${config.arch}" | ||
output="${builddir}/unittest/unittest-log-${appname}.txt" | ||
failonerror="true"> | ||
<env key="LD_LIBRARY_PATH" value="${basedir}/vendor/lib_${config.os}_${config.arch}" /> | ||
<arg value="-xml" /> | ||
<arg value="-logdir" /> | ||
<arg value="${builddir}/unittest" /> | ||
<arg value="-o" /> | ||
</exec> | ||
<concat> | ||
<fileset dir="${builddir}/unittest" /> | ||
</concat> | ||
</target> | ||
|
||
<target name="coverage" description="Compute unit tests coverage"> | ||
<exec | ||
executable="gcovr" | ||
dir="${builddir}/test"> | ||
<arg value="-kbpu" /> | ||
<arg value="--xml" /> | ||
<arg value="-e" /> | ||
<arg value=".*moc_.*" /> | ||
<arg value="-e" /> | ||
<arg value=".*Test\..*" /> | ||
<arg value="-e" /> | ||
<arg value=".*vendor/.*" /> | ||
<arg value="-e" /> | ||
<arg value=".*release/.*" /> | ||
<arg value="-e" /> | ||
<arg value=".*docs/.*" /> | ||
<arg value="-e" /> | ||
<arg value=".*export/.*" /> | ||
<arg value="-e" /> | ||
<arg value=".*TestRunner\.cpp" /> | ||
<arg value="-e" /> | ||
<arg value=".*qrc_resources\.cpp" /> | ||
<arg value="-e" /> | ||
<arg value=".*\.h" /> | ||
<arg value="-e" /> | ||
<arg value=".*c\+\+/.*" /> | ||
<arg value="-o" /> | ||
<arg value="${builddir}/coverage/coverage.xml" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="cppcheck" description="Find coding standard violations"> | ||
<exec | ||
executable="cppcheck" dir="${basedir}" | ||
error="${builddir}/cppcheck/cppcheck.xml"> | ||
<arg value="--enable=all" /> | ||
<arg value="--inconclusive" /> | ||
<arg value="--xml" /> | ||
<arg value="--xml-version=2" /> | ||
<arg value="${sourcedir}" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="doc" description="Generate documentation"> | ||
<exec | ||
executable="doxygen" | ||
dir="${basedir}"> | ||
</exec> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
TEMPLATE = subdirs | ||
|
||
APPNAME=qhttp | ||
SUBDIRS += src | ||
SUBDIRS += example | ||
|
||
example.depends = src | ||
|
||
OTHER_FILES += \ | ||
build.properties \ | ||
build.xml \ | ||
qompoter.json \ | ||
qompoter.pri \ | ||
README.md \ | ||
changelogs.md \ | ||
|
||
include($$PWD/vendor/qompote.pri) | ||
$$setBuildDir() | ||
message("$$APPNAME [ build folder is $$OBJECTS_DIR ]") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "azadkuh/qhttp", | ||
"description": "a light-weight and asynchronous HTTP library (both server & client) in Qt5 and c++14", | ||
"keywords": ["Qt", "C++", "HTTP"], | ||
"authors": [ | ||
{ | ||
"name": "azadkuh", | ||
"homepage": "https://github.com/azadkuh" | ||
} | ||
], | ||
"require": { | ||
"nodejs/http-parser": "v2.7.0" | ||
}, | ||
"repositories": { | ||
"nodejs/http-parser": "https://github.com" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
qhttp-lib { | ||
DEFINES += QOMP_QHTTP | ||
QOMP_NAME_QHTTP=qhttp | ||
|
||
LIBNAME = $$QOMP_NAME_QHTTP | ||
IMPORT_INCLUDEPATH = $$PWD/$$QOMP_NAME_QHTTP/include | ||
IMPORT_LIBPATH = $$PWD/$$LIBPATH | ||
INCLUDEPATH += $$IMPORT_INCLUDEPATH | ||
LIBS += -L$$IMPORT_LIBPATH -l$$getLibName($${LIBNAME}, "Qt") | ||
} | ||
|
||
qhttp { | ||
DEFINES += QOMP_QHTTP | ||
QOMP_NAME_QHTTP=qhttp | ||
|
||
HEADERS += \ | ||
$$PWD/http-parser/http_parser.h \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpfwd.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpabstracts.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpserverconnection.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpserverrequest.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpserverresponse.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpserver.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/private/qhttpbase.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/private/qhttpserverconnection_private.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/private/qhttpserverrequest_private.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/private/qhttpserverresponse_private.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/private/qhttpserver_private.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/private/qhttpclientrequest_private.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/private/qhttpclientresponse_private.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/private/qhttpclient_private.hpp \ | ||
|
||
SOURCES += \ | ||
$$PWD/http-parser/http_parser.c \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpabstracts.cpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpserverconnection.cpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpserverrequest.cpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpserverresponse.cpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpserver.cpp | ||
|
||
contains(DEFINES, QHTTP_HAS_CLIENT) { | ||
HEADERS += \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpclient.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpclientresponse.hpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpclientrequest.hpp | ||
|
||
SOURCES += \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpclientrequest.cpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpclientresponse.cpp \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src/qhttpclient.cpp | ||
} | ||
|
||
INCLUDEPATH += \ | ||
$$PWD/$$QOMP_NAME_QHTTP \ | ||
$$PWD/$$QOMP_NAME_QHTTP/src \ | ||
$$PWD/$$QOMP_NAME_QHTTP/vendor | ||
} |
Oops, something went wrong.