forked from pocoproject/poco
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
56 changed files
with
3,946 additions
and
0 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 |
---|---|---|
|
@@ -16,6 +16,11 @@ | |
*.vsp | ||
*.psess | ||
|
||
# Gradle # | ||
########## | ||
.gradle/ | ||
gradle/ | ||
|
||
# Make # | ||
######## | ||
config.build | ||
|
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,3 +1,6 @@ | ||
[submodule "openssl"] | ||
path = openssl | ||
url = https://github.com/pocoproject/openssl | ||
[submodule "gradle"] | ||
path = gradle | ||
url = https://github.com/pocoproject/gradle |
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,32 @@ | ||
model { | ||
components { | ||
CppParser(NativeLibrarySpec) { | ||
sources { | ||
rc { | ||
source { | ||
srcDir '..' | ||
include 'DLLVersion.rc' | ||
} | ||
} | ||
cpp { | ||
source { | ||
srcDir 'src' | ||
include '**/*.cpp' | ||
} | ||
exportedHeaders { | ||
srcDir 'include' | ||
} | ||
lib project: ':Foundation', library: 'Foundation' | ||
} | ||
} | ||
} | ||
} | ||
binaries { | ||
withType(SharedLibraryBinarySpec) { | ||
if (toolChain in VisualCpp) { | ||
cppCompiler.define "CppParser_EXPORTS" | ||
} | ||
} | ||
} | ||
} | ||
task poco { dependsOn "assemble" } |
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,52 @@ | ||
import org.gradle.nativeplatform.test.cppunit.CppUnitTestSuiteSpec | ||
|
||
model { | ||
components { | ||
TestSuite(NativeLibrarySpec) { | ||
sources { | ||
cpp { | ||
source { | ||
srcDir 'src' | ||
include '**/*.cpp' | ||
exclude '*Driver.cpp' | ||
} | ||
exportedHeaders { | ||
srcDir 'src' | ||
} | ||
lib project: ':CppUnit', library: 'CppUnit' | ||
lib project: ':CppParser', library: 'CppParser' | ||
lib project: ':Foundation', library: 'Foundation' | ||
} | ||
} | ||
} | ||
} | ||
testSuites { | ||
CppParserTestSuite(org.gradle.nativeplatform.test.cppunit.CppUnitTestSuiteSpec) { | ||
testing $.components.TestSuite | ||
} | ||
} | ||
binaries { | ||
all { | ||
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) { | ||
} | ||
} | ||
withType(org.gradle.nativeplatform.test.cppunit.CppUnitTestSuiteBinarySpec) { | ||
lib project: ':CppUnit', library: 'CppUnit', linkage: 'shared' | ||
} | ||
} | ||
} | ||
task testsuite { dependsOn "assemble" } | ||
|
||
|
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,33 @@ | ||
project(":CppUnit/WinTestRunner") { | ||
model { | ||
components { | ||
PocoWinTestRunner(NativeExecutableSpec) { | ||
sources { | ||
cpp { | ||
source { | ||
srcDir 'src' | ||
include '**/*.cpp' | ||
} | ||
exportedHeaders { | ||
srcDir 'include' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
binaries { | ||
all { | ||
} | ||
withType(SharedLibraryBinarySpec) { | ||
lib project: ':CppUnit', library: 'PocoCppUnit', linkage: 'shared' | ||
if (toolChain in VisualCpp) { | ||
cppCompiler.define "WinTestRunner_EXPORTS" | ||
} | ||
} | ||
withType(StaticLibraryBinarySpec) { | ||
lib project: ':CppUnit', library: 'PocoCppUnit', linkage: 'static' | ||
} | ||
} | ||
} | ||
} | ||
|
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,35 @@ | ||
model { | ||
components { | ||
CppUnit(NativeLibrarySpec) { | ||
sources { | ||
rc { | ||
source { | ||
srcDir '..' | ||
include 'DLLVersion.rc' | ||
} | ||
} | ||
cpp { | ||
source { | ||
srcDir 'src' | ||
include '**/*.cpp' | ||
} | ||
exportedHeaders { | ||
srcDir 'include' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
binaries { | ||
withType(SharedLibraryBinarySpec) { | ||
if (toolChain in VisualCpp) { | ||
cppCompiler.define "CppUnit_EXPORTS" | ||
} | ||
} | ||
withType(StaticLibraryBinarySpec) { | ||
} | ||
} | ||
} | ||
task poco { dependsOn "assemble" } | ||
|
||
|
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,45 @@ | ||
model { | ||
components { | ||
Crypto(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: ':Foundation', library: 'Foundation' | ||
} | ||
} | ||
} | ||
} | ||
binaries { | ||
all { | ||
if (toolChain in VisualCpp) { | ||
linker.args "ws2_32.lib" | ||
linker.args "iphlpapi.lib" | ||
} | ||
if (toolChain in Gcc) { | ||
linker.args "-lssl" | ||
linker.args "-lcrypto" | ||
} | ||
} | ||
withType(SharedLibraryBinarySpec) { | ||
if (toolChain in VisualCpp) { | ||
cppCompiler.define "Crypto_EXPORTS" | ||
} | ||
} | ||
} | ||
} | ||
task poco { dependsOn "assemble" } | ||
|
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,27 @@ | ||
model { | ||
components { | ||
genrsakey(NativeExecutableSpec) { | ||
sources { | ||
cpp.source { srcDir 'genrsakey/src' include '**/*.cpp' } | ||
cpp.lib project: ':Crypto', library: 'Crypto' | ||
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 sample { dependsOn "assemble" } | ||
|
||
|
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,65 @@ | ||
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 project: ':Crypto', library: 'Crypto' | ||
lib library: 'ssl' | ||
lib library: 'crypto' | ||
lib project: ':Foundation', library: 'Foundation' | ||
} | ||
} | ||
} | ||
} | ||
testSuites { | ||
CryptoTestSuite(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" } | ||
|
Oops, something went wrong.