mirror of
https://github.com/ysoftdevs/cpp-examples.git
synced 2026-01-15 00:03:36 +01:00
add example how to configure Gradle C++ Debug
This commit is contained in:
14
gradle/03-hello-muni-with-debug/build.gradle
Normal file
14
gradle/03-hello-muni-with-debug/build.gradle
Normal 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'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
cout << "Hello FI MUNI!" << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user