Commit Graph

39 Commits

Author SHA1 Message Date
Raul Metsma
2785364b7b iOS: Add support for Mac Catalyst
Issue: #20132
Signed-off-by: Raul Metsma <raul@metsma.ee>
2024-07-03 11:15:45 -04:00
Craig Scott
315cf74025
Help: Note CMAKE_IOS_INSTALL_COMBINED deprecation in toolchains example 2023-12-30 18:38:05 +11:00
Craig Scott
af2e4379fc
Help: Fix typo not accounting for addition of visionOS 2023-12-30 18:36:34 +11:00
Gregor Jasny
25977e177b apple: add preliminary visionOS support 2023-07-11 20:20:25 +02:00
Brad King
2f3d945f83 VS: Add CMAKE_GENERATOR_PLATFORM field to control Windows SDK selection
Add a `version=` field to explicitly control the SDK version selection
without relying on `CMAKE_SYSTEM_VERSION`.

Fixes: #16713
2023-04-05 12:06:22 -04:00
scivision
9e1b30121f Help:toolchain: refer to CheckSourceCompiles 2023-03-14 16:48:25 -04:00
Hinell
004568a9f3 Help: Add links between cmake-{toolchains,presets}(7)
Also improve formatting and add `versionadded` markup.
2022-09-09 10:11:07 -04:00
Alex Turbov
1b94770f27 Help: Insert link to cmake --toolchain option 2022-08-14 09:58:42 +04:00
Chris Wright
87142bbd5f ADSP: Add dedicated platform module 2022-04-04 17:05:09 +01:00
Robert Maynard
d5c3e4ac32 cmake: add support for --toolchain command argument 2021-04-15 10:13:49 -04:00
Brad King
4950d35733 Help: Document CMAKE_ANDROID_NDK_VERSION variable 2021-03-03 10:27:50 -05:00
Haibo Huang
1a4b1cca1c Android: update documentation for NDK integration 2020-12-08 10:46:55 -05:00
Kyle Edwards
0a638e86b2 Help: Add note about Visual Studio tools for Android 2020-10-07 10:24:38 -04:00
Stephen Kelly
32a6ab1f3b QNX: Add support for CMAKE_SYSROOT
QCC is a wrapper around GCC, but it is not a fully transparent wrapper.
Some compile options need to be passed to GCC using a `-Wc` option.

QCC does not support --sysroot, so setting CMAKE_SYSROOT in a toolchain
file currently does not work.  This means that it is likely that no one
is setting CMAKE_SYSROOT in existing QNC toolchain files.  Override the
GCC option for sysroot in the QCC.cmake file with -Wc,-isysroot.

This exposes a further issue in that the QNX SDK does not follow the
same architectural folder structure as linux uses.  That is, on linux
systems, architecture-specific libraries might be in

    <sysroot>/usr/lib/<arch>

such as

    /usr/lib/x86_64-linux-gnu/libcurl.so

CMake models this by suffixing the <arch> onto lib directories when
searching for libraries.

The QNX SDK is structured differently such that the <arch> should be
used as a prefix:

    <sysroot>/<arch>/usr/lib

such as

    <sysroot>/x86_64/usr/lib/libcurl.so

Add a variable for platform configuration to set whether to prefix or
suffix the <arch> and set that in the QCC.cmake.

Use the directory structure of the QNX SDK to compute the <arch> from
the implicit library directories.  The assumption is that the arch will
be a single directory directly below the CMAKE_SYSROOT, below which the
usr/ prefix occurs.

It would not be appropriate to instruct users to make the <arch> part of
the sysroot when specified in the toolchain file because:

1.  That would be non-DRY - The QCC wrapper already determines the <arch>
    by the -V argument passed to the compiler, specified in the toolchain
    file as the CMAKE_C_COMPILER_TARGET variable.
2.  The includes in the QNX SDK are not below the <arch> directory.

So, the location of the <arch> in the full path is different on QNX
compared to, say an embedded linux platform, but the intent is the same.

Add documentation to recommend the use of CMAKE_SYSROOT in a QNX
toolchain file.

As the CMAKE_SYSROOT is always the same for QNX, it would be possible to
simply set it in QCC.cmake.  However, that would change behavior for
existing users as when CMAKE_SYSROOT is set, files/paths outside of the
CMAKE_SYSROOT do not get found.

The <arch> prefixing is only enabled in cmSearchPath.cxx if
CMAKE_SYSROOT is set.  This ensures that the user gets consistency in
the current state without CMAKE_SYSROOT, and gets better consistency
when using CMAKE_SYSROOT.
2020-01-27 14:04:56 -05:00
Brad King
97bca2f9fa Android: Use unified toolchain in NDK r19+
The NDK build system now uses only a single toolchain in

    <ndk>/toolchains/llvm/prebuilt/<host>

Its compilers are always `bin/{clang,clang++}` and its binutils are
always `bin/<triple>-*`.  It is a standalone toolchain:

* The Anrdoid API level is specified at the end of `--target=`.
* The standard library may be specified via `-stdlib=`.
* No need to pass system includes or libraries explicitly.
* No need to pass `--sysroot` or `-gcc-toolchain`.

Teach CMake to recognize NDK versions that have a unified
toolchain with its own sysroot and use the above approach.

Fixes: #18739
2019-07-26 14:17:07 -04:00
Oleg Chernovskiy
16434fe303 Help: Discourage using CMAKE_SOURCE_DIR in toolchain files
Fixes: #19390
2019-07-03 08:45:29 +10:00
Bartosz Kosiorek
0e4fbb4a1f Help: Improve formatting of Help documentation 2019-04-08 14:53:31 +02:00
Ruslan Baratov
f7d602b572 Help: Example of tweaking iOS/tvOS/watchOS build
CMAKE_OSX_ARCHITECTURES and CMAKE_OSX_DEPLOYMENT_TARGET variables
can be used to tweak iOS/tvOS/watchOS build
2019-03-05 09:45:50 -05:00
Ruslan Baratov
4a9e2e4f35 Help: find_package with fat iOS libraries 2019-03-05 09:45:50 -05:00
Gregor Jasny
e8ee8cab97 Xcode: Completely disable code signing for compiler id detection
Issue: #17870
2019-02-04 09:03:35 -05:00
Gregor Jasny
11da882a12 Apple: Introduce separate system name for iOS, tvOS, and watchOS
- Remove code signing requirements for non-macOS
- Do not set deployment target for non-macOS
- Build static library for compiler feature detection for non-macOS
- Use framework to run CompilerId tests for watchOS
- Port tests to new SDK handling
- Add new Apple cross-compiling section to toolchain documentation

Closes: #17870
2019-02-04 09:03:35 -05:00
Brad King
3d00be13ee Android: Add support for unified headers
The unified headers are preferred as of NDK r15, so use them by default
if available and provide an option to use the deprecated headers.

Inspired-by: Florent Castelli <florent.castelli@gmail.com>
Fixes: #16584
2017-06-12 11:47:30 -04:00
Brad King
3d42a72bd5 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-14 14:29:14 -05:00
Brad King
6b84df8da9 Help: Document cross compiling for Android
CMake now supports cross compiling for Android using the NDK or a
standalone toolchain.  Document the associated variables and how how to
write toolchain files for Android.
2016-08-23 12:53:10 -04:00
Brad King
d929c35f08 CMakeForceCompiler: Deprecate this module and its macros
We originally deprecated this module in commit v3.5.0-rc1~295^2
(CMakeForceCompiler: Deprecate this module and its macros, 2015-10-19).
Then a use case was found to still require the module so the deprecation
was reverted for CMake 3.5 by commit v3.5.0-rc3~4^2 (CMakeForceCompiler:
De-deprecate until more use cases have alternatives, 2016-02-17).  Since
then `CMAKE_TRY_COMPILE_TARGET_TYPE` was introduced to provide an
alternative solution for that use case.  Deprecate the module again.
2016-03-08 10:42:28 -05:00
Chuck Atkins
31d52139ca Cray: Added documentation for cross compiling on a Cray 2015-11-14 11:35:14 -05:00
Brad King
2402bb8cfd Help: Document Windows 10 Universal Applications in cmake-toolchains(7) 2015-10-05 09:48:15 -04:00
Mikhail Filimonov
8c0afaf450 VS: Add more Nsight Tegra generator Android property settings
Extend the Nsight Tegra project generator to add bunch of properties
with the backing variables to fine-tune the generated projects.

Add target properties that map to all "Configuration" PropertyGroups for
each configuration:

* ANDROID_ARCH
* ANDROID_STL_TYPE

Add target properties that map to the AntBuild section of vcxproj files:

* ANDROID_ANT_ADDITIONAL_OPTIONS
* ANDROID_ASSETS_DIRECTORIES
* ANDROID_JAR_DEPENDENCIES
* ANDROID_JAR_DIRECTORIES
* ANDROID_JAVA_SOURCE_DIR
* ANDROID_NATIVE_LIB_DEPENDENCIES
* ANDROID_NATIVE_LIB_DIRECTORIES
* ANDROID_PROCESS_MAX
* ANDROID_PROGUARD
* ANDROID_PROGUARD_CONFIG_PATH
* ANDROID_SECURE_PROPS_PATH
* ANDROID_SKIP_ANT_STEP

Reviewed-by: Dmitry Polyanitsa <dpolyanitsa@nvidia.com>
2015-07-14 14:24:05 -04:00
Dmitry Polyanitsa
eeaa25e521 Add 'ANDROID_API_MIN' target property to set Android Target MIN API
Also add a 'CMAKE_ANDROID_API_MIN' variable to set the property
default.  Teach the VS generator to write the MIN API value into
Nsight Tegra project files.
2014-12-17 11:17:28 -05:00
Brad King
23e2bd7e8c Help: Document Nsight Tegra toolchain configuration (#15276) 2014-12-02 14:40:25 -05:00
Brad King
a9dcf4773c Help: Drop TOC from latex manuals
A latex document can have its own TOC.
2014-11-06 14:46:18 -05:00
Brad King
80b19a7127 Help/manual: Avoid long lines in code blocks
Update the wording of some examples to avoid long lines in code blocks.
Otherwise the formatted documentation can exceed certain column width
limitations.
2014-10-22 16:48:04 -04:00
Brad King
2702216637 Help: Add Windows Phone/Store cross-compiling to cmake-toolchains.7
Show simple example toolchain files for each.
2014-09-19 13:22:22 -04:00
Pascal Bach
db54d87287 Help: Add Windows CE cross-compiling to cmake-toolchains.7 manual 2014-09-19 13:18:31 -04:00
Pascal Bach
0d72451a05 Help: Add Cross Compiling subsections in cmake-toolchains.7 manual
Organize the "Cross Compiling" section into subsections by platform.
This will make it easier to add more subsections for more platforms.
2014-09-19 13:10:31 -04:00
Stephen Kelly
39d08b929e Help: Add additional hyperlink targets 2014-02-09 12:11:09 +01:00
Stephen Kelly
80e9fe9cee Help: Note that language-specific 'built-ins' are set by the project command. 2014-01-07 09:38:01 -05:00
Stephen Kelly
d98ea6c0b8 Help: Mark some code blocks as containing cmake code. 2014-01-04 11:28:57 +01:00
Stephen Kelly
c45b5ceb66 Help: Add cmake-toolchains.7 manual
Create a manual for toolchain related docs.
2013-12-03 09:44:31 -05:00