Last active
August 29, 2015 14:24
-
-
Save AurelienRibon/1fd235c94f4ebcd69122 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| apply plugin: 'cpp' | |
| apply plugin: 'c' | |
| model { | |
| components { | |
| /** | |
| * Definition of the main executable | |
| */ | |
| main(NativeExecutableSpec) { | |
| sources { | |
| cpp { | |
| source { | |
| srcDir 'src/main' | |
| include '**/*.cpp' | |
| } | |
| } | |
| } | |
| binaries.all { | |
| lib library: 'fossa', linkage: 'static' | |
| if (toolChain in VisualCpp) { | |
| cppCompiler.args '/W4', '/WX' // enable all warnings | |
| cppCompiler.args '/EHsc' // enable exceptions | |
| } | |
| if (toolChain in Clang) { | |
| cppCompiler.args '-std=c++11' // enable c++11 | |
| } | |
| } | |
| } | |
| /** | |
| * Definition of the FOSSA library | |
| */ | |
| fossa(NativeLibrarySpec) { | |
| sources { | |
| c { | |
| source { | |
| srcDir 'src/fossa' | |
| include '**/*.c' | |
| } | |
| exportedHeaders { | |
| srcDir 'src/fossa' | |
| } | |
| } | |
| } | |
| binaries.all { | |
| cCompiler.define 'NS_ENABLE_THREADS' | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment