Commit Graph

968 Commits

Author SHA1 Message Date
Brad King
f6f5f9f75f Merge topic 'ghs'
ce4f20ba62 GHS: Add release notes
281c601024 GHS: Update default BSP name
01c98c6ccc GHS: Update setting default OS location for Integrity platforms
bb77dc0cee GHS: Set primary target using arch/platform values (or user specified value)
f80692cf60 GHS: Add platform selection support
a37a4a00c8 GHS: Add toolset selection support
5d40d2b44f GHS: Support ARM, PPC, 86 architectures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Soucy <matthew.soucy@baesystems.com>
Merge-request: !798
2018-07-12 09:15:18 -04:00
Fred Baksik
281c601024 GHS: Update default BSP name
-- Use default value of sim<arch> if not user defined
-- Also no reason to trim quotes or changes slashes; it is just a name not a path
2018-07-11 08:48:23 -04:00
Fred Baksik
01c98c6ccc GHS: Update setting default OS location for Integrity platforms
-- Update how the latest OS is determined; scan the location GHS_OS_ROOT and sort it
   No longer use registry settings looking for installations
     The registry values are assigned in installation order for Green Hills tools not version order
   Filter out files from the list of directories (i.e if int1234.zip and int1234 are both in root folder)
2018-07-11 08:46:26 -04:00
Fred Baksik
bb77dc0cee GHS: Set primary target using arch/platform values (or user specified value) 2018-07-11 08:44:49 -04:00
Martin Storsjö
de5a4653d7 Add WindowsPhone and WindowsStore platform modules for Clang/GNU C/CXX
Just like the existing WindowsPhone and WindowsStore platform modules
for MSVC, just include the corresponding Windows platform modules.

MinGW tools (both with GCC and Clang) can be used for building for
Windows Store, even though it isn't a very common or simple setup.
2018-07-08 00:06:37 +03:00
Marc Chevrier
66ea1a3795 LINK_OPTIONS: Add support of "LINKER:" prefix 2018-06-06 17:22:41 +02:00
Sebastian Holtermann
caa138c1a5 Move GNU COMPILER_PREDEFINES_COMMAND from Platform to Compiler
Moves `CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND` from linux specific
[Modules/Platform/Linux-GNU.cmake](Modules/Platform/Linux-GNU.cmake) to
[Modules/Compiler/GNU.cmake](Modules/Compiler/GNU.cmake).
This enables compiler predefines generation (in AUTOMOC) on all
platforms that run gcc (and clang).
2018-06-01 09:21:06 +02:00
Brad King
edf0ea9bb2 CUDA: Drop unused/broken platform link flags placeholder
The `<CMAKE_CUDA_LINK_FLAGS>` placeholder in CUDA rule variables comes
from the `<CMAKE_CXX_LINK_FLAGS>` placeholder from which the CUDA rule
variables were originally derived.  It is not a public interface for
adding link flags so no projects should be using it.  It is needed for
platform information modules to specify platform-specific link flags for
the language.  None of our platform modules set it, so it is unused.

Furthermore, it is broken as currently implemented.  Some of the
contexts in which it is used need `-Xlinker` and some do not.
Therefore it is not possible to use the placeholder at all.

Simply remove it for now.  If some need for platform-specific CUDA link
flags arises a new solution will be needed.
2018-05-25 10:03:03 -04:00
Brad King
541b53375d Merge topic '17870-effective-system-name'
4597396784 Apple: Use include_guard() within compiler config
e95b3fd9bb Apple: Use CMAKE_EFFECTIVE_SYSTEM_NAME to share compiler info
84f9f63fcc Modules: Introduce CMAKE_EFFECTIVE_SYSTEM_NAME to lookup compiler info
9fa0f2eb56 CMakeFindPackageMode: Perform platform-specific initialization

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1964
2018-04-19 08:20:15 -04:00
Gregor Jasny
4597396784 Apple: Use include_guard() within compiler config 2018-04-18 07:41:44 -04:00
Gregor Jasny
e95b3fd9bb Apple: Use CMAKE_EFFECTIVE_SYSTEM_NAME to share compiler info
Apple platforms macOS, iOS, tvOS, and watchOS can all share the same
compiler information.  Rename `Darwin-*` modules to `Apple-*` and load
them all through `CMAKE_EFFECTIVE_SYSTEM_NAME`.  This saves duplication
of 4 * 21 compiler information modules.

Issue: #17870
2018-04-18 07:41:42 -04:00
Brad King
da294a039d Android: Add support for NDK r17
The `armeabi` ABI is no longer available, so we can no longer use it by
default unconditionally.  Instead detect all available ABIs and choose
the oldest arm ABI that is available.

Also update the test suite to account for the lack of `armeabi` support
and pass as of Android NDK r17-beta2.
2018-04-17 11:21:15 -04:00
Brad King
308d21b225 Merge topic 'msvc-toolset-version-variable'
45bf6f6246 Modules: Use MSVC_TOOLSET_VERSION variable to simplify logic
304f493e57 MSVC: Add MSVC_TOOLSET_VERSION variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1882
2018-04-05 13:26:49 -04:00
Arkady Shapkin
304f493e57 MSVC: Add MSVC_TOOLSET_VERSION variable
Provide the MSVC toolset version number based on the compiler version.

Fixes: #16923
2018-04-04 13:21:09 -04:00
Brad King
8496d11ef8 Merge topic 'android-no-libstdc++'
843d55de29 Android: Suppress implicit -lstdc++ linker flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1919
2018-04-04 11:14:36 -04:00
Brad King
640bc9def4 Merge topic 'cuda_support_system_libraries_with_device_symbols'
41eab150a8 CUDA: Pass more link libraries to device linking
88c7abb740 CUDA: Pass host linker directories to device linker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1634
2018-04-04 11:12:52 -04:00
Brad King
843d55de29 Android: Suppress implicit -lstdc++ linker flag
The chosen STL libraries are already linked explicitly so we shouldn't
let the compiler add its implicit `-lstdc++` (the default) when invoking
the linker.

Fixes: #17863
NDK-Issue: https://github.com/android-ndk/ndk/issues/105
Inspired-by: Tom Hughes <tomtheengineer@gmail.com>
2018-04-03 14:34:57 -04:00
Brad King
eb80af9093 Drop Visual Studio 8 2005 generator
This generator has been deprecated since CMake 3.9.  Remove it.
2018-04-02 10:08:10 -04:00
Brad King
88c7abb740 CUDA: Pass host linker directories to device linker
In some environments, libraries containing device code are installed in
directories searched by the host linker but not passed by nvcc to
nvlink.  Make these libraries available by explicitly passing the
host linker search directories during device linking.

Issue: #16317
2018-03-28 09:38:43 -04:00
xoviat
a18147e933 MSVC,Clang,Flang: Add IPO support
Fixes: #17692
2018-02-23 10:27:57 -05:00
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