summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
Commit message (Collapse)AuthorAgeFilesLines
* POSITION_INDEPENDENT_CODE: Manage link flags for executablesMarc Chevrier2018-11-1111-4/+20
| | | | Fixes: #14983, #16561
* Merge topic 'msvc-custom-rc-mt'Brad King2018-11-022-5/+10
|\ | | | | | | | | | | | | | | | | | | | | bd9bfc6449 MSVC: Respect CMAKE_RC_COMPILER and CMAKE_MT in vs_link_{dll,exe} 0033676796 CUDA: Enable RC language on Windows 02f566a559 MSVC: Factor out enable_language(RC) call into helper macro b601bb6f1c CUDA: Find CMAKE_LINKER on Windows 3eebe28ef4 cmLocalNinjaGenerator: Simplify CreateRulePlaceholderExpander Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2424
| * MSVC: Respect CMAKE_RC_COMPILER and CMAKE_MT in vs_link_{dll,exe}Mateusz Zych2018-10-292-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | CMake commands vs_link_dll and vs_link_exe, performing linking on MSVC, are responsible for calling resource compiler and manifest tool. Before this commit, both of these tools were called directly, with the expectation that they are available in the `PATH`. This has been fixed by respecting CMake variables `CMAKE_RC_COMPILER` and `CMAKE_MT` defining paths to these tools. Fixes: #17804
| * CUDA: Enable RC language on WindowsBrad King2018-10-291-0/+2
| | | | | | | | | | We need the resource compiler to place manifests in binaries. Make sure it is available.
| * MSVC: Factor out enable_language(RC) call into helper macroBrad King2018-10-291-1/+4
| | | | | | | | This will be useful to call from elsewhere later.
* | RPATH: Record support for $ORIGIN on various *BSDPeter Wu2018-10-264-0/+11
| | | | | | | | | | | | | | | | | | | | All of NetBSD, FreeBSD, OpenBSD and DragonFly BSD support `$ORIGIN`, but the last two require `-z origin` as documented at https://lekensteyn.nl/rpath.html The `-z origin` option causes a flag bit to be set and has no effect if the `RPATH` does not contain expandable tokens.
* | RPATH: Record support for $ORIGIN on Haiku and SolarisPeter Wu2018-10-262-0/+2
| | | | | | | | | | Solaris 7 and Haiku (since 2013) both support $ORIGIN as documented at https://lekensteyn.nl/rpath.html
* | RPATH: Add option for using $ORIGIN in build treePeter Wu2018-10-261-0/+1
| | | | | | | | | | | | | | | | | | This makes binaries independent of the build directory by not embedding the build directory via RPATH. The tests are partially based on the existing RuntimePath test, but with the check moved into a POST_BUILD command such that it can be skipped when the platform lacks support. Fixes: #18413
* | Merge topic 'autogen-moc-predef-cross-compile'Brad King2018-10-081-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | 66f49d1f9a Android: Add clang --target= flag to compiler predefines command 39534c58c5 Autogen: Add clang --target= flag to compiler predefines command Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: André Klitzing <aklitzing@gmail.com> Merge-request: !2452
| * Android: Add clang --target= flag to compiler predefines commandBrad King2018-10-051-0/+1
| | | | | | | | | | | | | | | | When we set `CMAKE_<LANG>_COMPILER_TARGET` to the Android target architecture, add it to `CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND` also. This is needed to make moc predefines aware of `__ANDROID__`. Fixes: #18425
* | Platform/GNU: Add Debian shared library permissions policySvante Signell2018-10-031-0/+27
|/ | | | | | Copy the `CMAKE_INSTALL_SO_NO_EXE` setting from `Platform/Linux`. Fixes: #18376
* IN_LIST: Ensure policy allows if(IN_LIST) if used by a moduleCraig Scott2018-09-121-0/+5
|
* Merge topic 'android-ndk-r18'Brad King2018-08-302-2/+15
|\ | | | | | | | | | | | | ca97d4cb5f Android: Add support for NDK r18 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2319
| * Android: Add support for NDK r18Brad King2018-08-282-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | NDK r18 drops GCC toolchains and some STL types. We need to choose a clang toolchain by default when no gcc toolchains are available. Switch the STL type default to `c++_static` when the old `gnustl_static` default is not available. Update the test suite to not run tests for STL types that do not exist. Also do not expect the gcc toolchain `cpp` tool to be available because r18 does not provide it. Also teach it to tolerate `gcc -dumpmachine` output like `arm--linux-android` that differs from the toolchain prefix. Fixes: #18301
* | Merge topic 'cuda-no-cublas_device'Brad King2018-08-241-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 122c79748c CUDA: Avoid using deprecated cublas_device to identify device lib dirs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2296
| * | CUDA: Avoid using deprecated cublas_device to identify device lib dirsRobert Maynard2018-08-231-1/+1
| |/ | | | | | | | | | | | | Use `curand_static` to identify directories containing device libraries because `cublas_device` is deprecated and will be removed in the future. Issue: #18290
* | Intel: Use xilib as librarian on WindowsyrHeTaTeJlb2018-08-071-1/+1
| | | | | | | | | | | | | | | | We already use `xilink` instead of `link`, so use `xilib` instead of lib too. Suggested-by: Christian Pfeiffer <cpfeiffer@live.de> Issue: #18240
* | Merge topic 'ghs'Brad King2018-07-121-28/+32
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | GHS: Update default BSP nameFred Baksik2018-07-111-1/+2
| | | | | | | | | | | | | | | -- 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
| * | GHS: Update setting default OS location for Integrity platformsFred Baksik2018-07-111-26/+30
| | | | | | | | | | | | | | | | | | | | | -- 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)
| * | GHS: Set primary target using arch/platform values (or user specified value)Fred Baksik2018-07-111-1/+0
| | |
* | | Add WindowsPhone and WindowsStore platform modules for Clang/GNU C/CXXMartin Storsjö2018-07-078-0/+8
|/ / | | | | | | | | | | | | | | 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.
* | LINK_OPTIONS: Add support of "LINKER:" prefixMarc Chevrier2018-06-066-3/+16
|/
* Move GNU COMPILER_PREDEFINES_COMMAND from Platform to CompilerSebastian Holtermann2018-06-011-1/+0
| | | | | | | | 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).
* CUDA: Drop unused/broken platform link flags placeholderBrad King2018-05-251-4/+4
| | | | | | | | | | | | | | | | 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.
* Merge topic '17870-effective-system-name'Brad King2018-04-1934-46/+38
|\ | | | | | | | | | | | | | | | | | | 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
| * Apple: Use include_guard() within compiler configGregor Jasny2018-04-184-16/+4
| |
| * Apple: Use CMAKE_EFFECTIVE_SYSTEM_NAME to share compiler infoGregor Jasny2018-04-1834-38/+42
| | | | | | | | | | | | | | | | | | 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
* | Android: Add support for NDK r17Brad King2018-04-171-1/+34
|/ | | | | | | | | 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.
* Merge topic 'msvc-toolset-version-variable'Brad King2018-04-051-0/+25
|\ | | | | | | | | | | | | | | 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
| * MSVC: Add MSVC_TOOLSET_VERSION variableArkady Shapkin2018-04-041-0/+25
| | | | | | | | | | | | Provide the MSVC toolset version number based on the compiler version. Fixes: #16923
* | Merge topic 'android-no-libstdc++'Brad King2018-04-048-0/+16
|\ \ | | | | | | | | | | | | | | | | | | 843d55de29 Android: Suppress implicit -lstdc++ linker flag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1919
| * | Android: Suppress implicit -lstdc++ linker flagBrad King2018-04-038-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge topic 'cuda_support_system_libraries_with_device_symbols'Brad King2018-04-041-2/+17
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | 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
| * | CUDA: Pass host linker directories to device linkerBrad King2018-03-281-2/+17
| |/ | | | | | | | | | | | | | | | | 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
* | Drop Visual Studio 8 2005 generatorBrad King2018-04-021-3/+0
|/ | | | This generator has been deprecated since CMake 3.9. Remove it.
* MSVC,Clang,Flang: Add IPO supportxoviat2018-02-231-0/+28
| | | | Fixes: #17692
* GNU: Use -fvisibility on AIX when supportedBrad King2018-01-121-1/+3
| | | | | | | | | 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
* Darwin: Emit deployment target that matches the SDKGregor Jasny2017-12-221-0/+15
| | | | Closes: #17431
* Merge topic 'cuda_darwin_proper_install_names_flags'Brad King2017-12-081-0/+19
|\ | | | | | | | | | | | | ce3874b3 CUDA: Shared libraries on Darwin properly setup @rpath install_names Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1570
| * CUDA: Shared libraries on Darwin properly setup @rpath install_namesRobert Maynard2017-12-071-0/+19
| | | | | | | | | | | | 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.
* | Merge topic 'cuda-implicit-include-dirs'Brad King2017-11-291-0/+3
|\ \ | | | | | | | | | | | | | | | | | | 2f72573a CUDA: Treat /usr/include as an implicit include directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1528
| * | CUDA: Treat /usr/include as an implicit include directoryBrad King2017-11-271-0/+3
| |/ | | | | | | | | | | We already do this for C and C++. Fixes: #17512
* | MSVC: Fix MSVC_VERSION when mixing MSVC C/C++ with Intel FortranBrad King2017-11-151-1/+5
| | | | | | | | | | | | | | | | 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
* | Flang: Add support for compiling sources on WindowsIsuru Fernando2017-10-311-0/+1
| | | | | | | | Define `CMAKE_Fortran_COMPILE_OBJECT` for Flang on Windows.
* | Merge topic 'clang-cl-TP'Brad King2017-10-262-0/+2
|\ \ | |/ | | | | | | | | | | 7077a554 Clang: Use -TP flag for C++ sources with clang-cl Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1407
| * Clang: Use -TP flag for C++ sources with clang-clBrad King2017-10-252-0/+2
| | | | | | | | | | | | We do this for `cl`, so we should do it for `clang-cl`. Fixes: #17394
* | Flang: Add partial support on WindowsIsuru Fernando2017-10-241-0/+2
|/ | | | | | | Add minimal changes needed to help Flang itself build on Windows using CMake. Additional work will be required for full support. Issue: #17384
* Merge topic 'midipix-support'Brad King2017-09-211-0/+1
|\ | | | | | | | | | | | | 0df43496 Midipix: Add minimal platform file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1294
| * Midipix: Add minimal platform filemidipix2017-09-201-0/+1
| | | | | | | | Add Midipix.cmake (UnixPaths, no overrides, no special cases).