add example how to configure Gradle C++ Debug

This commit is contained in:
Juraj Michalek
2013-11-23 17:00:25 +01:00
parent b220ce7aa6
commit a42867ed02
3 changed files with 43 additions and 7 deletions

View File

@@ -0,0 +1,14 @@
apply plugin: 'cpp-exe'
// Based on http://www.gradle.org/docs/current/userguide/nativeBinaries.html
binaries.all {
if (toolChain in Gcc && buildType == buildTypes.debug) {
cppCompiler.args "-g"
}
if (toolChain in VisualCpp && buildType == buildTypes.debug) {
cppCompiler.args '/Zi'
cppCompiler.define 'DEBUG'
linker.args '/DEBUG'
}
}

View File

@@ -0,0 +1,9 @@
#include <iostream>
using namespace std;
int main() {
cout << "Hello FI MUNI!" << endl;
return 0;
}