Skip to content

Commit

Permalink
Removed google test and other stuff from root.
Browse files Browse the repository at this point in the history
  • Loading branch information
geekbeast committed Jun 27, 2015
1 parent 9db5b32 commit 53d3ddb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 103 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ build/
.DS_Store
/Debug/
krypto-lib/libs/googleTest/1.7.0/lib/osx/
krypto-lib/libs/googleTest/1.7.0/lib/linux/
krypto-lib/libs/googleTest/1.7.0/lib/linux/
libs/googleTest/1.7.0/lib/osx/
libs/googleTest/1.7.0/lib/linux/
89 changes: 0 additions & 89 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
apply plugin: "eclipse-cdt"
apply plugin: "cpp"
apply plugin: "google-test"

task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}
Expand All @@ -13,88 +9,3 @@ task buildGoogleTestMac(type: Exec) {
task buildGoogleTest(type: Exec) {
commandLine './buildGoogleTest.sh'
}

model {
toolChains {
/*gcc(Gcc) {
cppCompiler.withArguments { args ->
args << "-std=c++14"
}
}*/
clang(Clang) {
eachPlatform {
cppCompiler.withArguments { args ->
args << "-std=c++1y"
}
}
}
}
flavors {
debug
release
failing
}
platforms {
x86 {
architecture "x86"
}
x64 {
architecture "x64"
}
}
repositories {
libs(PrebuiltLibraries) {
googleTest {
headers.srcDir "libs/googleTest/1.7.0/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile =
file("libs/googleTest/1.7.0/lib/" +
findGoogleTestCoreLibForPlatform(targetPlatform))
}
}
}
}
components {
main(NativeLibrarySpec) {
targetPlatform "x86"
binaries.withType(SharedLibraryBinarySpec) {
// Define a preprocessor macro that only applies to shared libraries
cppCompiler.define "DLL_EXPORT"
}
}
}
}

tasks.withType(GenerateMetadataFileTask) {

}

// START SNIPPET configure-test-binary
binaries.withType(GoogleTestTestSuiteBinarySpec) {
lib library: "googleTest", linkage: "static"
lib library: "main", linkage: "static"

if (flavor == flavors.failing) {
cppCompiler.define "PLUS_BROKEN"
}
}
// END SNIPPET configure-test-binary
// END SNIPPET complete-example

tasks.withType(RunTestExecutable) {
args "--gtest_output=xml:test_detail.xml"
}

def findGoogleTestCoreLibForPlatform(Platform platform) {

if (platform.operatingSystem.windows) {
return "vs2013/gtest.lib"
// return "vs2013/gtest-core.lib"
// return "cygwin/gtest-core.lib"
// return "mingw/gtest-core.lib"
} else if (platform.operatingSystem.macOsX) {
return "osx/libgtest.a"
} else {
return "linux/libgtest.a"
}
}
2 changes: 1 addition & 1 deletion buildGoogleTestMac.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cd gtest-1.7.0 && cmake . && make && mv libgtest.a ../krypto-lib/libs/googleTest/1.7.0/lib/osx/
cd gtest-1.7.0 && cmake . && make && cp libgtest.a ../krypto-lib/libs/googleTest/1.7.0/lib/osx/
12 changes: 0 additions & 12 deletions krypto-lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,12 @@ apply plugin: "eclipse-cdt"
apply plugin: "cpp"
apply plugin: "google-test"

// group = "com.kryptnostic"
// version = 1.0

task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}

model {
toolChains {
/*
gcc(Gcc) {
cppCompiler.withArguments { args ->
args << "-std=c++1y"
}
}*/
clang(Clang) {
eachPlatform {
cppCompiler.withArguments { args ->
Expand Down Expand Up @@ -65,7 +56,6 @@ tasks.withType(GenerateMetadataFileTask) {

}

// START SNIPPET configure-test-binary
binaries.withType(GoogleTestTestSuiteBinarySpec) {
lib library: "googleTest", linkage: "static"
lib library: "main", linkage: "static"
Expand All @@ -74,8 +64,6 @@ binaries.withType(GoogleTestTestSuiteBinarySpec) {
cppCompiler.define "PLUS_BROKEN"
}
}
// END SNIPPET configure-test-binary
// END SNIPPET complete-example

tasks.withType(RunTestExecutable) {
args "--gtest_output=xml:test_detail.xml"
Expand Down

0 comments on commit 53d3ddb

Please sign in to comment.