Download Gradle User Guide

Transcript
47.3.2. Compiling on Windows
The Windows C++ support can use either the MinGW g++ or the Microsoft Visual C++ cl tool,
either of which must be installed and on the PATH for the Gradle process. Gradle searches first for
Microsoft Visual C++, and then MinGW.
47.4. Configuring the compiler
Arbitrary arguments can be provided to the compiler by using the following syntax:
Example 47.3. Supplying arbitrary args to the compiler
build.gradle
executables {
main {
spec {
args "-fno-access-control", "-fconserve-space"
}
}
}
The above example applies to the cpp-exe plugin, to supply arguments for the cpp-lib plugin
replace “executables” with “libraries”.
47.5. Working with shared libraries
The C++ plugin provides an installMain task, which creates a development install of the
executable, along with the shared libraries it requires. This allows you to run the executable without
needing to install the shared libraries in their final locations.
47.6. Dependencies
Dependencies for C++ projects are binary libraries that export header files. The header files are
used during compilation, with the compiled binary dependency being used during the linking.
47.6.1. External Dependencies
External dependencies (i.e. from a repository, not a subproject) must be specified using the
following syntax:
Page 261 of 342