add c language Visual Studio example

This commit is contained in:
Juraj Michalek
2014-04-10 19:53:13 +02:00
parent 1f87dd7c8f
commit faa16c51e7
3 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
apply plugin: 'c'
apply plugin: 'visual-studio'
sources {
main {
c {
source {
// Include just source, avoid including *.swp and other helper files
include "**/*.c"
}
}
}
}
executables {
main {
}
}

View File

@@ -0,0 +1,6 @@
#include <stdio.h>
int main() {
printf("Making the MFPs think\n");
return 0;
}

View File

@@ -84,3 +84,14 @@ Gradle automatically detects toolchain e.g. Visual Studio or GCC.
gradle mainExecutable
Binary is stored in build/binaries/mainExecutable
08-c-visual-studio
------------------
Gradle is able to generate project files for Visual Studio for C/C++.
gradle mainVisualStudio
ii .\visualStudio\mainExe.sln
Solution file is stored in visualStudio/mainExe.sln