Backport of pocoproject/feature-gradle to pocoproject/develop (#2127)

* Backport of feature-gradle

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Replace '/' by '\' to comply with DOS path

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Cleanup

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Put environment setting at the Exec task.

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Use standard release

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Updated mkdoc configuration

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Remove lines guarded by POCO_ENABLE_CPP11

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Merge remote-tracking branch 'origin/develop' into develop

* Fix NuGet & Wix input dependencies file set.

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>

* Remaining fixes for Data2SQL switch.

* Use $global:LastExitCode instead of a local LastExitCode
This commit is contained in:
zosrothko
2018-02-09 15:05:15 +01:00
committed by Aleksandar Fabijanic
parent 22ddce7c9d
commit 5fa3d6094e
84 changed files with 8254 additions and 3 deletions

View File

@@ -0,0 +1,41 @@
model {
components {
NetSSL(NativeLibrarySpec) {
sources {
rc {
source {
srcDir '..'
include 'DLLVersion.rc'
}
}
cpp {
source {
srcDir 'src'
include '**/*.cpp'
}
exportedHeaders {
srcDir 'include'
}
lib library: 'ssl'
lib library: 'crypto'
lib project: ':Crypto', library: 'Crypto'
lib project: ':Net', library: 'Net'
lib project: ':Util', library: 'Util'
lib project: ':Foundation', library: 'Foundation'
}
}
}
}
binaries {
withType(SharedLibraryBinarySpec) {
if (toolChain in VisualCpp) {
cppCompiler.define "NetSSL_EXPORTS"
}
}
withType(StaticLibraryBinarySpec) {
}
}
}
task poco { dependsOn "assemble" }

View File

@@ -0,0 +1,68 @@
model {
components {
download(NativeExecutableSpec) {
sources {
cpp.source { srcDir 'download/src' include '**/*.cpp' }
cpp.lib project: ':Net', library: 'Net'
cpp.lib project: ':NetSSL_OpenSSL', library: 'NetSSL'
cpp.lib project: ':Crypto', library: 'Crypto'
cpp.lib library: 'crypto'
cpp.lib library: 'ssl'
cpp.lib project: ':Util', library: 'Util'
cpp.lib project: ':Foundation', library: 'Foundation'
}
}
HTTPSTimeServer(NativeExecutableSpec) {
sources {
cpp.source { srcDir 'EchoServer/src' include '**/*.cpp' }
cpp.lib project: ':Net', library: 'Net'
cpp.lib project: ':NetSSL_OpenSSL', library: 'NetSSL'
cpp.lib project: ':Crypto', library: 'Crypto'
cpp.lib library: 'crypto'
cpp.lib library: 'ssl'
cpp.lib project: ':Util', library: 'Util'
cpp.lib project: ':Foundation', library: 'Foundation'
}
}
Mail(NativeExecutableSpec) {
sources {
cpp.source { srcDir 'HTTPFormServer/src' include '**/*.cpp' }
cpp.lib project: ':Net', library: 'Net'
cpp.lib project: ':NetSSL_OpenSSL', library: 'NetSSL'
cpp.lib project: ':Crypto', library: 'Crypto'
cpp.lib library: 'crypto'
cpp.lib library: 'ssl'
cpp.lib project: ':Util', library: 'Util'
cpp.lib project: ':Foundation', library: 'Foundation'
}
}
TwitterClient(NativeExecutableSpec) {
sources {
cpp.source { srcDir 'httpget/src' include '**/*.cpp' }
cpp.lib project: ':Net', library: 'Net'
cpp.lib project: ':NetSSL_OpenSSL', library: 'NetSSL'
cpp.lib project: ':Crypto', library: 'Crypto'
cpp.lib library: 'crypto'
cpp.lib library: 'ssl'
cpp.lib project: ':Util', library: 'Util'
cpp.lib project: ':Foundation', library: 'Foundation'
}
}
}
binaries {
all {
}
withType(SharedLibraryBinarySpec) {
lib project: ':Foundation', library: 'Foundation', linkage: 'shared'
}
withType(StaticLibraryBinarySpec) {
lib project: ':Foundation', library: 'Foundation', linkage: 'static'
}
withType(NativeExecutableSpec) {
lib project: ':Foundation', library: 'Foundation', linkage: 'static'
}
}
}
task samples { dependsOn "assemble" }

View File

@@ -0,0 +1,74 @@
import org.gradle.nativeplatform.test.cppunit.CppUnitTestSuiteSpec
model {
components {
withType(NativeComponentSpec) {
binaries.withType(NativeBinarySpec) {
if (buildType == buildTypes.debug) {
if (it instanceof NativeExecutableBinarySpec) {
executable.file = toLocalBin(appendDebugSuffix(executable.file), targetPlatform)
}
} else
if (buildType == buildTypes.release) {
if (it instanceof NativeExecutableBinarySpec) {
executable.file = toLocalBin(executable.file, targetPlatform)
}
}
}
}
TestSuite(NativeLibrarySpec) {
sources {
cpp {
source {
srcDir 'src'
include '**/*.cpp'
exclude '*Driver.cpp'
}
exportedHeaders {
srcDir 'src'
}
lib project: ':CppUnit', library: 'CppUnit'
lib library: 'crypto'
lib library: 'ssl'
lib project: ':Crypto', library: 'Crypto'
lib project: ':Net', library: 'Net'
lib project: ':NetSSL_OpenSSL', library: 'NetSSL'
lib project: ':Util', library: 'Util'
lib project: ':JSON', library: 'JSON'
lib project: ':XML', library: 'XML'
lib project: ':Foundation', library: 'Foundation'
}
}
binaries.all {
if (targetPlatform.operatingSystem.windows) {
lib library: 'WS2_32', linkage: 'static'
}
}
}
}
testSuites {
NetSSLTestSuite(org.gradle.nativeplatform.test.cppunit.CppUnitTestSuiteSpec) {
testing $.components.TestSuite
}
}
binaries {
withType(org.gradle.nativeplatform.test.cppunit.CppUnitTestSuiteBinarySpec) {
lib project: ':CppUnit', library: 'CppUnit', linkage: 'shared'
if (toolChain in VisualCpp) {
if (buildType == buildTypes.debug) {
cCompiler.args "/MDd"
cppCompiler.args "/MDd"
} else
if (buildType == buildTypes.release) {
cCompiler.args "/MD"
cppCompiler.args "/MD"
} else {
throw new GradleException("Unknown buildType" + buildType)
}
}
if (toolChain in Gcc) {
}
}
}
}
task testsuite { dependsOn "assemble" }