| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit v3.8.0-rc1~304^2 (MSVC: Do not define _DEBUG explicitly when
using /MDd, 2016-11-15) we removed the `_DEBUG` preprocessor definition
from MSVC C and C++ flags because the `cl` compiler automatically
defines it in Debug builds anyway. However, the VS generators propagate
C preprocessor definitions to the RC (Windows Resource Compiler) tool.
This means that we used to explicitly define `_DEBUG` for RC debug
builds. Therefore existing project code may expect the definition to be
there even though the `rc` compiler itself does not implicitly define
`_DEBUG` in debug builds.
Add the `_DEBUG` flag to the default `CMAKE_RC_FLAGS_DEBUG` instead
to restore this definition for RC debug builds. This also makes it
available consistently in VS, Ninja, and Makefile generators.
Fixes: #16745
|
| |
|
|
|
|
|
|
|
| |
Fix the default values of `CMAKE_CUDA_FLAGS[_<CONFIG>]` on Windows to
make the host compiler flags match those produced for C++ by the
`Platform/Windows-MSVC` module. This makes the flags consistent with
those used for C++.
|
|
|
|
|
|
|
| |
On Windows with MSVC-like host compilers we must honor the standard
libraries chosen by the `Platform/Windows-MSVC` module. Otherwise C
code linked into the CUDA binary that expects to have these libraries
available may not link.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The NDK's `build/core/definitions.mk` file adds compiler flags:
-isystem $$(call host-path,$$(SYSROOT_INC)/usr/include)
This passes the system include directory explicitly even though it is
implied by `--sysroot=`. The explicit flag places the directory
earlier in the include path than the sysroot-default one would be.
Teach CMake to add this include directory at the end of the standard
include path for Android. Otherwise the toolchain's `include-fixed/`
directory may replace system headers with "fixed" copies that are not
from the same API version.
Closes: #16536
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The NDK's own build files:
<ndk>/build/tools/build-cxx-stl.sh
<ndk>/build/cmake/android.toolchain.cmake
for the `c++_static` and `c++_shared` build types add the
`<ndk>/sources/android/support/include` include directory
between the two `<ndk>/sources/cxx-stl/llvm-libc++*` directories.
Re-order our own include directory generation to match.
Issue: #16536
|
|
|
|
|
|
|
|
| |
Previously we had a two issues when building cuda executables
that required separable compilation. The first was that we didn't
propagate FLAGS causing any -arch / -gencode flags to be dropped, and
secondly generators such as ninja would use the CXX language flags
instead of CUDA when the executable was mixed language.
|
|
|
|
|
|
|
| |
Port Windows-specific compilation and linking rules over from the
`Platform/Windows-MSVC` module and adapt it for NVIDIA CUDA. On Windows
nvcc and its host compiler (MSVC) do not understand or use options like
`-fPIC` or `-std=`, so condition those out.
|
| |
|
|
|
|
| |
Closes: #16535
|
|
|
|
|
|
|
| |
The PGI compiler on macOS does not support some macOS-specific flags so
pass them through `-Wl,` to the linker directly.
Issue: #16457
|
|\
| |
| |
| |
| |
| |
| | |
f7c5e970 Android: Add CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE
d95e6dff Android: Add CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG variable
3d42a72b Android: Always set CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
| |
With the latter flag the compiler automatically defines `_DEBUG`:
https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
Closes: #16430
|
|\
| |
| |
| |
| | |
883bd34a VS: Treat libraries ending in `.targets` as msbuild imports
|
| |
| |
| |
| |
| |
| |
| | |
Generate `<Import Project="..." .../>` to import the `.targets` files
into `.vcxproj` files.
Closes: #16340
|
| |
| |
| |
| |
| | |
Fuchsia is a new operating system. This module provides a minimal
setup needed to use Fuchsia toolchain.
|
|\ \
| |/
|/|
| |
| |
| | |
93504190 Darwin: Remove deployment target version check
542d52f9 Revert "Xcode: Convert maybe unversioned OSX sysroot into versioned SDK path"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Starting with Xcode 8 the SDK folder also contains an unversioned entry:
MacOSX.sdk
MacOSX10.12.sdk -> MacOSX.sdk
If this unversioned path is used CMake cannot detect the SDK version.
Furthermore, querying the SDK version via
xcodebuild -sdk <sysroot> -version Path
gives bogus results for the Command Line Tools installed into `/`.
The OS X deployment target version and SDK version are not as tied as
they once were, so this check is now more trouble than it is worth.
Simply remove it.
Closes: #16323
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Revert commit v3.7.0-rc1~48^2 (Xcode: Convert maybe unversioned OSX
sysroot into versioned SDK path, 2016-09-25). The replacement of
`else()` with `if(CMAKE_OSX_SYSROOT)` defeats the prior handling of
`if("x${CMAKE_OSX_SYSROOT}" MATCHES "/")`. This causes the combination
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/
to not be honored and `-isysroot` to be emitted as a compiler flag
universally. We will need another solution to the problem the
now-reverted commit was meant to address.
Closes: #16394
|
|\ \
| | |
| | |
| | |
| | |
| | | |
4c272adb Android: Link position-independent executables with proper flags
6205f179 Android: Set CMAKE_POSITION_INDEPENDENT_CODE automatically
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add `-fPIE -pie` to the default executable link flags when
`CMAKE_POSITION_INDEPENDENT_CODE` is enabled. This is required by
Android 16 and above for executables to run on the device.
Closes: #16382
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the toolchain file or cache does not set this, enable it
automatically based on the Android API version. Versions 16
and above expect position independent code.
Use the main `CMAKE_POSITION_INDEPENDENT_CODE` setting in favor of
hard-coding `-fpic` or `-fPIC` in the compiler flags for each ABI.
This allows CMake to use `-fpie` or `-fPIE` as needed when sources
are meant for executables, and `-fpic` or `-fPIC` for other sources.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
295c8efa Android: Add missing link flags for device executables
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
See `${ndk}/build/core/default-build-commands.mk` for link flags the NDK
uses for executables. Add them to our default executable link flags.
Suppress `nocopyreloc` on `arm64-v8a` because it does not work with
some STL types.
Closes: #16380
|
|\ \ \
| |/ /
| | |
| | |
| | | |
43f4326e Android: Fix support for armeabi with c++_static
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Add missing "unwind" and "atomic" libraries needed for this combination.
See `${ndk}/sources/cxx-stl/llvm-libc++/libs/armeabi/libc++.a` for the
libraries the NDK uses.
Issue: #16380
|
| |\ |
|
| |\ \ |
|
|\ \ \ \
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | | |
9af881d8 Tests: Add VSNsightTegra test for VS 2015
6739d240 Tests: Fix VSNsightTegra test on Android NDK r12b
06c39612 VS: Fix NVIDIA Nsight Tegra Visual Studio Edition support
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The guard added by commit v3.7.0-rc1~229^2~17 (Android: Suppress new
functionality with Nsight Tegra in VS IDE builds, 2016-06-02) to
`Modules/Platform/Android-Determine.cmake` does not work in that
location because `CMAKE_VS_PLATFORM_NAME` is not set until after the
module is loaded. Change this particular guard to test for the Visual
Studio generator instead. If in the future we add support for using
Visual Studio for Android without Nsight Tegra then something more will
be needed, but this is good enough for now.
Closes: #16371
|
|\ \ \
| | |/
| |/|
| | |
| | | |
e8bafb6f OS X: Do not try to set deployment target when cross-compiling
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The change in commit v3.4.0-rc2~6^2 (Xcode: Adjust deployment target SDK
version to host version, 2015-10-11) does not make sense when
cross-compiling. Make it conditional to fix this regression in some
cross-compiling cases.
Closes: #16355
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | | |
b6a174d2 Makefiles: Remove query for CMAKE_OBJECT_NAME
d0faa58a Makefiles: Remove forbidden flag logic
|
| | |
| | |
| | |
| | | |
This might have been needed some day in the past, but not anymore.
|
|/ /
| |
| |
| |
| |
| | |
Additional include directories are needed for this on some STL types.
Closes: #16350
|
|/
|
|
|
|
| |
The Android NDK r13 moved the libc++ include directories.
Closes: #16346
|
|\
| |
| |
| |
| | |
3f300b84 VS: Recognize VS/LLVM toolset names as Clang
|
| |
| |
| |
| |
| |
| | |
Update the toolset name matching added by commit v3.6.0-rc1~279^2~10
(VS: in Clang/C2 toolset, setup correct compiler settings, 2016-02-18)
to match VS/LLVM toolset names too.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with Xcode 8 the SDK folder also contains an unversioned
entry:
$ ls -l /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
drwxr-xr-x 5 root wheel 170 Mar 4 2018 MacOSX.sdk
lrwxr-xr-x 1 root wheel 10 Sep 16 20:49 MacOSX10.12.sdk -> MacOSX.sdk
If this unversioned path is used CMake cannot detect the SDK
version. To work around the problem we always invoke the code path
that translates short SDK names like "macosx10.12" into a path.
That way we always end up with a versioned SDK path in
_CMAKE_OSX_SYSROOT_PATH which is later used to determine the version.
Closes: #16323
|
|
|
|
|
|
| |
Use of `-fvisibility=hidden` warns:
warning: visibility attribute not supported in this configuration; ignored
|
|
|
|
|
| |
Allow projects to use `if(ANDROID)` to condition their Android-specific
code paths.
|
|
|
|
|
|
|
| |
Populate standard include directories and link libraries for the
platform. Select the STL corresponding to CMAKE_ANDROID_STL_TYPE and
matching the current ABI and toolchain to be used. Refer to the NDK
sources/cxx-stl/*/Android.mk files for the needed file locations.
|
|
|
|
|
| |
Initialize the CMAKE_{C,CXX}_FLAGS{,_<CONFIG>} cache entries with
flags for each ABI as specified by NDK toolchain `setup.mk` files.
|
|
|
|
|
|
| |
Android NDK builds are always `debug` or `release`. We may populate
flags for these configurations that are needed to produce compatible
binaries. Ensure they are used by default.
|
| |
|