Commit Graph

9 Commits

Author SHA1 Message Date
Brad King ea8eba0bbf Android: Add CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE
Expose the binutils' machine name (typically used as a prefix on the
tool names) publicly.  This is expected to match the `gcc -dumpmachine`
value.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:03:15 -05:00
Brad King 0d3eb139e1 Android: Add CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG variable
The NDK provides prebuilt toolchain files in directories named for the
host architecture.  The NDK build system calls this `HOST_TAG`.
Expose the value publicly for use by clients that need to pass it
to external tools.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:03:07 -05:00
Brad King 236d6244a0 Android: Always set CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION
When this variable is not set by the user or toolchain file, set it to
the default selected.  This will be useful for client code that needs to
pass the value to an external tool that needs to find the same toolchain
in the NDK.  Leave it empty for a standalone toolchain.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:02:57 -05:00
Brad King 86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Brad King fa63257821 Android: Avoid interfering with common pre-existing toolchain files
Commonly used Android toolchain files that pre-date CMake upstream
support may need to be updated to work with our new functionality.
They typically set CMAKE_SYSTEM_VERSION to 1, so detect that and
skip our upstream Android settings.  When such toolchain files are
updated to account for our upstream support, they can then set
CMAKE_SYSTEM_VERSION to a valid Android API and get new behavior.
2016-08-12 10:40:54 -04:00
Brad King 29b51379de Android: Detect and save a standalone toolchain without the NDK 2016-08-12 10:40:53 -04:00
Brad King 4389664a26 Android: Detect and save a toolchain from the NDK 2016-08-12 10:40:53 -04:00
Brad King 8e0cb45e55 Android: Suppress new functionality with Nsight Tegra in VS IDE builds
Support for NVIDIA Nsight Tegra Visual Studio Edition was previously
implemented in the CMake VS IDE generators.  Avoid interfering with
that functionality for now.  Later we may try to integrate this.
2016-08-12 10:40:52 -04:00
Brad King 64be1ae4a3 Android: Add placeholders for platform-specific compiler selection
Add infrastructure modules to be loaded for determining a compiler
selection when targeting Android platforms.
2016-08-12 10:40:51 -04:00