Commit Graph

948 Commits

Author SHA1 Message Date
Brad King
e1f0518de0 GNU: Use -fvisibility on AIX when supported
Revise the logic from commit v3.7.0-rc1~173^2~2 (GNU: Do not use
-fvisibility on AIX or HP-UX, 2016-09-03) to add a version check.
The GCC 7 release notes [1] state that visibility support has been
added for AIX 7.1 and above.

[1] https://gcc.gnu.org/gcc-7/changes.html
2018-01-12 11:50:10 -05:00
Gregor Jasny
4017bf40de Darwin: Emit deployment target that matches the SDK
Closes: #17431
2017-12-22 21:56:53 +01:00
Brad King
e81b7a2075 Merge topic 'cuda_darwin_proper_install_names_flags'
ce3874b3 CUDA: Shared libraries on Darwin properly setup @rpath install_names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1570
2017-12-08 09:53:33 -05:00
Robert Maynard
ce3874b303 CUDA: Shared libraries on Darwin properly setup @rpath install_names
Shared libraries linked with CUDA now properly setup booth the correct
install_name but also specify headerpad_max_install_names so that the names
can be changed post build.
2017-12-07 11:31:03 -05:00
Brad King
d4805dd47b Merge topic 'cuda-implicit-include-dirs'
2f72573a CUDA: Treat /usr/include as an implicit include directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1528
2017-11-29 08:20:45 -05:00
Brad King
2f72573a62 CUDA: Treat /usr/include as an implicit include directory
We already do this for C and C++.

Fixes: #17512
2017-11-27 10:24:13 -05:00
Brad King
3bc21a70b5 MSVC: Fix MSVC_VERSION when mixing MSVC C/C++ with Intel Fortran
When using a real MSVC compiler for `C` or `CXX`, use the version of
that compiler for `MSVC_VERSION`.  This is preferred over the MSVC
version that a non-MSVC compiler "simulates".

Fixes: #17468
2017-11-15 14:58:44 -05:00
Isuru Fernando
3c3682289d Flang: Add support for compiling sources on Windows
Define `CMAKE_Fortran_COMPILE_OBJECT` for Flang on Windows.
2017-10-31 08:48:15 -04:00
Brad King
0278ec84d8 Merge topic 'clang-cl-TP'
7077a554 Clang: Use -TP flag for C++ sources with clang-cl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1407
2017-10-26 08:56:37 -04:00
Brad King
7077a554f1 Clang: Use -TP flag for C++ sources with clang-cl
We do this for `cl`, so we should do it for `clang-cl`.

Fixes: #17394
2017-10-25 07:36:10 -04:00
Isuru Fernando
b2c6c3574e Flang: Add partial support on Windows
Add minimal changes needed to help Flang itself build on Windows using
CMake.  Additional work will be required for full support.

Issue: #17384
2017-10-24 11:27:08 -04:00
Brad King
aa8ad21ea5 Merge topic 'midipix-support'
0df43496 Midipix: Add minimal platform file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1294
2017-09-21 08:26:32 -04:00
midipix
0df434967c Midipix: Add minimal platform file
Add Midipix.cmake (UnixPaths, no overrides, no special cases).
2017-09-20 14:44:30 -04:00
Adriaan de Groot
a0508dee93 FreeBSD prefers to call the C++ compiler c++ (just like Linux, Darwin, ..) 2017-09-20 10:52:29 +02:00
Brad King
9c7bf6974f Merge topic 'remove-nmcl'
c2cc91a4 Platforms: Remove Windows-NMcl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1255
2017-09-14 07:38:29 -04:00
Christian Pfeiffer
c2cc91a4a5 Platforms: Remove Windows-NMcl
Since commit v2.8.10~148^2~2 (Modernize MSVC compiler information files,
2012-08-23), the Windows-NMcl platform has been broken.
It's most likely not needed anymore.
2017-09-13 14:52:45 +02:00
Brad King
7315a46c83 Merge topic 'MsvcArm64'
bc7c94fe MSVC: Add support for ARM64 architecture

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1215
2017-09-13 08:37:02 -04:00
Minmin Gong
bc7c94fe13 MSVC: Add support for ARM64 architecture
Visual Studio 15.4 adds support for this architecture.

Fixes: #17213
2017-09-12 09:54:29 -04:00
Konstantin Ivlev
8a4755ca57 VS: Update support for LLVM-vs* toolsets from LLVM 5.0
Revert commit v3.7.0-rc1~25^2 (VS: Recognize VS/LLVM toolset names as
Clang, 2016-09-28).  Since at least LLVM 5.0 the VS integration of the
LLVM toolchain now mimics cl and accepts MSVC-style command-line
arguments (unlike Microsoft Clang/C2).

Fixes: #17193, #17235
2017-09-11 09:58:22 -04:00
Brad King
faacd46d39 Merge topic 'android-ndk-r16'
5a1a1177 Android: Update for NDK r16

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Seither <d@fdseither.de>
Merge-request: !1237
2017-09-06 10:46:38 -04:00
Brad King
5a1a1177bf Android: Update for NDK r16
Since NDK commit 90ec78ffd96b87cd75d82575587ead14d6494df1 (Remove Clang
toolchain path from setup.mk, 2017-05-31) the `setup.mk` files for Clang
no longer hold the path to the `toolchains/llvm` directory.  It has been
the same since NDK r11, so use that as the default.

Fixes: #17253
2017-09-05 12:52:09 -04:00
Albert Ziegenhagel
f362052b81 GNUToMS: Tolerate existence of a %USERPROFILE%/source directory
The VS environment script we load changes the working directory to
`%USERPROFILE%/source` if it exists.  Set `VSCMD_START_DIR` to tell
the script to retain the current working directory.
2017-08-25 14:24:24 -04:00
Ben Boeckel
8ed03baa76 gitattributes: prefer eol=crlf to -crlf
The `crlf` attribute is deprecated in Git. This also changes the given
files to be in the index using LF newlines, but they will be checked
out with CRLF newlines due to the attribute.
2017-08-23 13:31:41 -04:00
Brad King
15f1602584 Merge topic 'android-plain-sysroot'
68d67c82 Android: Fix support for CMAKE_SYSROOT without CMAKE_SYSROOT_COMPILE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1101
2017-08-04 09:11:43 -04:00
Brad King
68d67c827f Android: Fix support for CMAKE_SYSROOT without CMAKE_SYSROOT_COMPILE
If `CMAKE_SYSROOT` is set by the user (e.g. via the toolchain file) then
we do not set `CMAKE_SYSROOT_COMPILE` to our default.  Fix our
references to the sysroot's `/usr/include` directory to use
`CMAKE_SYSROOT_COMPILE` only if it is set and else `CMAKE_SYSROOT`.

Fixes: #17096
2017-08-03 12:03:59 -04:00
Roman Wüger
8eb1cb3ff1 GHS: Correct the regex for the intXXXX directory detection.
The int directory does not only need to contain digits.
E.g. C:\GHS\int409a is a valid Green Hills installation
2017-07-17 11:30:04 +02:00
Brad King
489a7706c2 Merge topic 'android-system-include-last'
4bafa392 Android: Always add standard include directories last

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1052
2017-07-13 10:07:36 -04:00
Brad King
4bafa3922e Android: Always add standard include directories last
The logic added in commit v3.6.0-rc1~30^2 (Add a variable to specify
language-wide system include directories, 2016-05-24) to use
`CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` incorrectly filters them by
`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`.  Rather than recognizing
this, commit v3.8.0-rc1~60^2 (Android: Pass sysroot include directory
explicitly, 2017-01-20) worked around the problem by incorrectly
removing `/usr/include` from `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`
so it worked in `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES`.

By not filtering out `/usr/include` from user-specified include
directories, we allow the code

    include_directories(${CMAKE_SYSROOT}/usr/include)

to place the include directory too early on the command line.

Fix support for standard include directories to not be filtered by
implicit include directories, and do not remove `/usr/include` from the
list of implicit include directories for Android builds.  Add a test
case to verify that an explicit `/usr/include` is ignored in favor
of the standard directory at the end.

Fixes: #17059
2017-07-13 10:03:58 -04:00
Brad King
e63472abc5 Merge topic 'android-fix-c++_shared'
e0fb3f31 Android: Link to android_support with c++_shared

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1048
2017-07-12 09:00:43 -04:00
Brad King
e0fb3f314f Android: Link to android_support with c++_shared
The NDK has done this in `build/core/definitions.mk` since r13
(r12 and below do so only for c++_static).
2017-07-12 08:39:42 -04:00
Brad King
751f0e0adc Merge topic 'android-unified-headers'
5d317930 Android: Fix include path for unified headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !997
2017-06-22 10:12:59 -04:00
Brad King
5ba09a75a2 Merge branch 'android-unified-headers' into release-3.9 2017-06-22 09:52:23 -04:00
Brad King
5d31793023 Android: Fix include path for unified headers
In commit v3.9.0-rc3~3^2 (Android: Add support for unified headers,
2017-06-12) we accidentally constructed the unified header include
directories from the linking sysroot.  Construct them from the
compiling sysroot instead.

Fixes: #16584
2017-06-22 08:28:44 -04:00
Brad King
d3b981ab3e Merge topic 'ipo-per-lang'
ba247cca IPO: Consider support for each language separately

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !964
2017-06-15 10:05:02 -04:00
Brad King
61c1848cdc Merge branch 'ipo-per-lang' into release-3.9 2017-06-14 15:10:39 -04:00
Brad King
ba247ccaba IPO: Consider support for each language separately
We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and
Fortran languages.  Do not try to enable support for other languages.
Furthermore, each language builds with a different compiler, so check
for support by CMake and the compiler for each language independently.

Fixes: #16944
2017-06-14 10:36:57 -04:00
Brad King
9203aff851 Merge topic 'android-unified-headers'
3d00be13 Android: Add support for unified headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !956
2017-06-13 09:27:17 -04:00
Brad King
087b8ccda9 Merge topic 'cuda-dlink-no-deprecated-gpu'
7368ade2 CUDA: When linking device code suppress CUDA 8.0+ deprecation warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !951
2017-06-13 09:18:19 -04:00
Brad King
fb99b0b87b Merge branch 'cuda-dlink-no-deprecated-gpu' into release-3.9 2017-06-13 09:17:06 -04:00
Robert Maynard
7368ade250 CUDA: When linking device code suppress CUDA 8.0+ deprecation warnings
The CUDA compiler automatic deprecation warnings are pure noise when
doing device linking, and should be suppressed to reduce the amount of
confusion from users.
2017-06-13 09:15:19 -04: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
f6ed92280c Merge topic 'android-standalone-no-sysroot-include'
22f8a465 Android: Do not pass sysroot include for standalone toolchain

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !952
2017-06-12 10:23:22 -04:00
Brad King
637ff39d45 Merge topic 'android-standalone-unified-api-level'
5f93bf78 Android: Detect API version of standalone toolchain with unified headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !950
2017-06-12 10:23:06 -04:00
Brad King
a131316a95 Merge branch 'android-standalone-no-sysroot-include' into release-3.9 2017-06-09 16:42:13 -04:00
Brad King
22f8a465d7 Android: Do not pass sysroot include for standalone toolchain
The change in commit v3.8.0-rc1~60^2 (Android: Pass sysroot include
directory explicitly, 2017-01-20) does not make sense when compiling
with a standalone toolchain which is tied to a single API version.
Drop the explicit include directory so that the compiler uses its
default system include order.

Fixes: #16954
2017-06-09 16:28:32 -04:00
Brad King
5f93bf787d Android: Detect API version of standalone toolchain with unified headers
A standalone toolchain with unified headers keeps the `__ANDROID_API__`
macro in the `bin/clang` launcher instead of in `api-level.h`.

Issue: #16954
2017-06-09 14:19:52 -04:00
Reto Schneider
a0436a2f61 SDCC: Remove superfluous whitespace from link line 2017-06-08 13:19:49 -04:00
Reto Schneider
dcf559d060 SDCC: Do not explicitly ask linker to generate Intel Hex files
The `--out-fmt-ihx` option added by commit v2.6.0~1253 (...use
--out-fmt-ihx to enforce .ihx files, 2007-08-15) may interfere with
options requested by the user.  Also, when no linker output is
specified, SDCC outputs Intel Hex by default anyway.
2017-06-08 13:18:28 -04:00
Brad King
9f552e2e5a Merge topic 'vs15-GNUtoMS'
abe8a623 GNUtoMS: Add search path for VS 2017 environment scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !875
2017-05-24 10:37:51 -04:00
Alex Ghosh
abe8a623d9 GNUtoMS: Add search path for VS 2017 environment scripts
Use `cmake_host_system_information` to query the VS Installer tool for
the locations of VS versions since VS 2017 does not provide registry
entries anymore.  Add a loop to simplify addition of future versions.
2017-05-22 14:52:05 -04:00