summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
Commit message (Collapse)AuthorAgeFilesLines
...
* | ADSP: Add dedicated platform moduleChris Wright2022-04-045-0/+70
| |
* | Genex-LINK_GROUP: Add support feature RESCAN on BSD systemsMarc Chevrier2022-03-222-0/+14
| |
* | Merge topic 'ghs_predefined_targets'Brad King2022-03-211-2/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 399e73b89a GHS: release note 829e946c69 GHS: Update tests for updated binary layout 93c1acd8ff GHS: List predefined targets before user targets in GUI bdb213819c GHS: Do not include WindowsPaths b3e9c72901 GHS: use INSTALL target a645287784 GHS: update build command 724b5491ef GHS: Rearrange project files in binary directory edff0f6a1d GHS: Use Custom Target for ALL_BUILD ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7079
| * | GHS: Do not include WindowsPathsFred Baksik2022-03-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | This causes issues where CMAKE_SYSTEM_PREFIX_PATH contains incorrect paths. GHS is a cross-compiler toolchain and doesn't use anything in these locations. Also WindowsPaths are always wrong on Linux hosts.
* | | genex-LINK_LIBRARY: Add feature WHOLE_ARCHIVEMarc Chevrier2022-03-179-2/+168
|/ /
* | Merge topic 'LINK_LIBRARY-libraries'Brad King2022-03-073-41/+23
|\ \ | | | | | | | | | | | | | | | | | | | | | 9fb1dff070 LINK_LIBRARY: Add features for library support on Apple 93a153bc7f Genx-LINK_LIBRARY: simplify framework features definitions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7029
| * | LINK_LIBRARY: Add features for library support on AppleMarc Chevrier2022-03-051-0/+10
| | |
| * | Genx-LINK_LIBRARY: simplify framework features definitionsMarc Chevrier2022-03-043-41/+13
| | |
* | | Genex-LINK_GROUP: Add feature RESCANMarc Chevrier2022-03-053-0/+26
|/ / | | | | | | | | Feature RESCAN can be used to manage circular references between static libraries.
* | Merge topic 'ghs_fix_rtos_dir'Brad King2022-02-241-2/+2
|\ \ | |/ | | | | | | | | | | 005c7dc9e7 GHS: Store full path of Integrity OS directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7017
| * GHS: Store full path of Integrity OS directoryFred Baksik2022-02-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes build project error because the OS directory was a relative path from the binary directory. Fixes issue during project regeneration where the `-os_dir` project option was missing because GHS_OS_DIR was not properly stored in the cache file. This error was introduced by commit aa59eaac4f (GHS: Allow setting GHS variables from toolchain file, 2021-11-15, v3.23.0-rc1~337^2).
| * Merge topic 'clang-cross-compile-windows-pdb' into release-3.23Brad King2022-02-101-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | 641cb1093b Windows/Clang: Support PDB when cross-compiling Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !6959
* | | genex-LINK_LIBRARY: rename configuration variablesMarc Chevrier2022-02-163-24/+24
| | | | | | | | | | | | | | | | | | To be more consistent between genex and variables as well as the forecomming LINK_GROUP genex, rename variable *_LINK_USING_<FEATURE>* in *_LINK_LIBRARY_USING_<FEATURE>*
* | | GenEx/LINK_LIBRARY: Add features for framework support on AppleMarc Chevrier2022-02-153-0/+41
| | |
* | | Merge topic 'clang-cross-compile-windows-pdb'Brad King2022-02-101-0/+1
|\ \ \ | |/ / |/| / | |/ | | | | | | | | 641cb1093b Windows/Clang: Support PDB when cross-compiling Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !6959
| * Windows/Clang: Support PDB when cross-compilingDeniz Bahadir2022-02-081-0/+1
| |
* | Merge branch 'backport-IntelLLVM-depfile-flags' into IntelLLVM-depfile-flagsBrad King2022-02-093-3/+3
|\ \ | |/ |/|
| * IntelLLVM: Add dependencies on system header files on WindowsWilliam R. Dieter2022-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit a90d2a9eed (IntelLLVM: Add support for Intel LLVM-based compilers, 2020-11-02, v3.20.0-rc1~89^2~20) the IntelLLVM depfile generation flags were taken from `Platform/Windows-Intel-C`. Those flags were added by commit a624a3e1b3 (Ninja: Use deps=gcc for Intel Compiler on Windows, 2019-01-30, v3.14.0-rc1~30^2), which forgot to account for commit 6d74e7870b (Ninja: Add dependencies on system-provided header files, 2016-03-15, v3.6.0-rc1~265^2). The `-QMD` option generates Makefile dependencies. The `-QMMD` option generates Makefile dependencies, but excludes system header files. Part of the BuildDepends test includes a header, cmake_pch.hxx, that includes a second header, zot_pch.hxx. The test builds a pch file for cmake_pch.hxx, touches zot_pch.hxx, then verifes that cmake_pch.hxx.pch is regenerated based on the dependencies. The cmake_pch.hxx contains `#pragma system_header` before it includes zot_pch.hxx. `#pragma system_header` indicates that the portion of the file following the pragma is to be treated as a system header. When `-QMMD` is used to generate dependencies, the `#include` of zot_pch.hxx is ignored because it `-QMMD` says to ignore system headers. Using `-QMD` instead uses all headers when generating dependencies and causes this test to pass. The Clang configuration in Platform/Windows-Clang.cmake also uses the `-MD` option for generating pre-compiled headers, instead of `-MMD`. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
| * Intel: Add dependencies on system header files on WindowsBrad King2022-02-092-2/+2
| | | | | | | | | | | | | | In commit a624a3e1b3 (Ninja: Use deps=gcc for Intel Compiler on Windows, 2019-01-30, v3.14.0-rc1~30^2) we forgot to account for commit 6d74e7870b (Ninja: Add dependencies on system-provided header files, 2016-03-15, v3.6.0-rc1~265^2).
* | IBMClang: Do not use -fvisibility on AIXBrad King2022-01-282-0/+2
| | | | | | | | | | | | | | | | | | | | | | Use of `-fvisibility=hidden` fails: unsupported option '-fvisibility=hidden' for target 'powerpc-ibm-aix7.2.0.0' Apply the change from commit 4feba34d02 (GNU: Do not use -fvisibility on AIX or HP-UX, 2016-09-03, v3.7.0-rc1~173^2~2) to IBMClang also. Issue: #23157
* | IBMClang: Add support for IBM Open XL C/C++Aaron Liu2022-01-273-0/+19
| | | | | | | | Fixes: #22929
* | IntelLLVM: Set linker to compiler driver for WindowsWilliam R. Dieter2022-01-141-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For IntelLLVM, linking with the compiler driver is preferred over using the linker directly. This is especially true when doing offload to a target accelerator, which can produce object files that the regular linker will not handle properly. Windows-IntelLLVM relies on Windows-MSVC.cmake for many definitions. This commit does not change that, but does override the MSVC defaults for linking executables, shared libraries, and static libraries so that CMake will use the compiler driver instead of the linker. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | Merge topic 'cmcldeps-cross'Brad King2022-01-071-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | d49e168e1b Ninja: Do not use cmcldeps for RC on non-Windows hosts Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Dmitry Mikushin <dmitry@kernelgen.org> Merge-request: !6843
| * | Ninja: Do not use cmcldeps for RC on non-Windows hostsMartin Storsjö2022-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The `cmcldeps` executable is only built on Windows. If running MSVC on a different OS (with various compatibility wrapping), don't try to use `cmcldeps`, as the executable doesn't exist. Fixes: #21760
* | | MSVC: update arm64ec default flags and libmoyo19972022-01-061-1/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | Update the support added by commit 4ea3a88625 (MSVC: Add support for targeting ARM64EC, 2020-12-30, v3.20.0-rc1~121^2). Add `softintrin.lib` to `CMAKE_C_STANDARD_LIBRARIES_INIT`. Remove `/D_ARM64EC_WORKAROUND` from the flags as it was only ever needed in preview versions of VS. Issue: #21724
* | Merge topic 'android-system-stl'Brad King2021-12-141-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 38b00f8801 Android: Fix linking android_support for pre-21 system STL Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6799
| * | Android: Fix linking android_support for pre-21 system STLRyan Prichard2021-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | This typo was introduced in commit 4dca078829 (Android: Link c++abi and android_support when necessary, 2020-10-29, v3.20.0-rc1~541^2). Fixes: #23004
| * | Merge topic 'GNUtoMS-vs2022' into release-3.22Brad King2021-11-041-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | 571a795d2f GNUtoMS: Add search path for VS 2022 environment scripts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6695
* | | Merge topic 'ghs_initial_setup'Brad King2021-11-191-27/+100
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aa59eaac4f GHS: Allow setting GHS variables from toolchain file ab6f0b51b1 GHS: Add note about -T and path style a55b5c4e18 GHS: Update BSP selection logic 0427f22539 GHS: Update RTOS selection logic e006b87cc6 GHS: GHSMULTI - Update documentation to match implementation 83eb5695e9 GHS: Update toolset selection logic 8114ddcad1 GHS: Continue splitting variables used by generator 831607889f GHS: Update selection of primaryTarget in MULTI project file ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6715
| * | | GHS: Allow setting GHS variables from toolchain fileFred Baksik2021-11-151-32/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update generator to use the current variable definition, not the CACHE definition. * Avoid overwriting toolchain variables and avoid developer warnings when setting up the GHS variables. -- A cache entry is only required when: a) The toolchain uses set( CACHE ) to set the variable b) A -D or preset value was used to set the variable The cache entry is required so that the TYPE gets set properly. -- Avoid the Policy CMP0126 warnings: setting cache variable when normal variable exists * Move GHS_PRIMARY_TARGET back into area so non-GHS generator toolchain file can trigger the OS search.
| * | | GHS: Update BSP selection logicFred Baksik2021-11-151-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Selection of a BSP only needs to be performed if not set by user. Remove all the logic for printing error and status messages about BSP selection. These messages also breaks CMake tests. NOTE: If BSP selection fails then the compiler checks will result in a build error. The build error will report that the BSP does not exist.
| * | | GHS: Update RTOS selection logicFred Baksik2021-11-151-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Selection of an RTOS only needs to be performed if not set by user. Avoid CMake developer warnings for setting GHS_OS_DIR multiple times. Instead only set it once after searching has been performed. Remove all the logic for printing error and status messages about RTOS selection. This was broken and reporting incorrect messages. These messages also breaks CMake tests. NOTE: If RTOS selection fails then the compiler checks will result in a build error. The build error will report that the RTOS "GHS_OS_DIR-NOT-SPECIFIED" does not exist.
| * | | GHS: Update toolset selection logicFred Baksik2021-11-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- Ensure that GHS_TOOLSET_ROOT is used as a path * Converts directory path slashes to CMake style -- Use ComparePath() to properly check for path changes of build tool * Accounts for Windows file-system case insensitivity. -- Don't print message "defaulting" messages (this causes CMake test failures) -- Don't force update CMAKE_GENERATOR_TOOLSET back into cache when `-T` is not used on initial configure. This change avoids an unnessary error message when accidentally using `-T` in subsequent runs but the same tools are always used. -- Use IssueMessage() for error messages.
| * | | GHS: Continue splitting variables used by generatorFred Baksik2021-11-151-6/+6
| | | | | | | | | | | | | | | | | | | | This makes it easier to use GHS-MULTI platform in other generators that want to use the GHS-MULTI platform and compilers.
| * | | GHS: Update selection of primaryTarget in MULTI project fileFred Baksik2021-11-151-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to ``-A`` handling: * Don't force CMAKE_GENERATOR_PLATFORM into cache when using default value (breaks using CMake presets). * Don't print message when using default value (breaks CMake tests). Changes to ``GHS_PRIMARY_TARGET`` handling: * Add as a cache variable so its known to GUI * Don't always include``GHS_TARGET_PLATFORM``, it's only needed if ``GHS_PRIMARY_TARGET`` wasn't set by the user. * Set ``GHS_PRIMARY_TARGET`` during platform selection instead of when a language is enabled. By performing this sooner ``GHS_TARGET_PLATFORM`` is not always required to be set into cache.
* | | | Clang/Windows: Use ThinLTO if possible to match other platformsRaul Tambre2021-11-141-1/+6
|/ / / | | | | | | | | | Fixes #22905.
* | | Merge topic 'GNUtoMS-vs2022'Brad King2021-11-041-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 571a795d2f GNUtoMS: Add search path for VS 2022 environment scripts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6695
| * | GNUtoMS: Add search path for VS 2022 environment scriptsBrad King2021-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Extend the logic from commit 08c5b3eff0 (GNUtoMS: Add search path for VS 2019 environment scripts, 2020-01-09, v3.16.3~15^2) to consider VS 2022 paths too. Fixes: #22847
| * | Merge topic 'android-PATH' into release-3.21Brad King2021-09-171-5/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 94f3776774 Android: Restore searching PATH for executables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6528
* | \ \ Merge topic 'vs-instance'Brad King2021-10-211-1/+3
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 46e9ff5729 Restore honoring CMAKE_GENERATOR_INSTANCE in toolchain file 42418b02f7 Android: Refactor sysroot detection under Visual Studio 44a86d0b38 cmake_host_system_information: Add undocumented VS_MSBUILD_COMMAND key 6999b87133 cmGlobalVisualStudio10Generator: Add method to find MSBuild early 7f730464be cmGlobalGenerator: Add method to check if generator is at least VS 10 8917b8512f cmGlobalVisualStudioVersionedGenerator: Allow repeating SetGeneratorInstance 6511654164 cmGlobalVisualStudio10Generator: Allow subclasses to reset MSBuild search Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6646
| * | | Android: Refactor sysroot detection under Visual StudioBrad King2021-10-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 6051a49c78 (Visual Studio: Add Android support, 2020-06-12, v3.19.0-rc1~619^2) we run MSBuild to build a sample project to detect the sysroot. Previously we relied on `CMAKE_VS_MSBUILD_COMMAND` being available. That required commit d5b5c19278 (cmGlobalGenerator: FindMakeProgram() before CMakeDetermineSystem, 2020-06-15, v3.19.0-rc1~619^2~3) to make it available early enough. However, that ordering broke `CMAKE_GENERATOR_INSTANCE` so we need to prepare to revert it. Use `cmake_host_system_information` to get the location of MSBuild under a VS generator instead.
* | | | CUDA: Allow both CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATIONRobert Maynard2021-10-201-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | The target properties `CUDA_SEPARABLE_COMPILATION` and `CUDA_PTX_COMPILATION` now aren't mutually exclusive and can now be used together on the same target.
* | | | Merge topic 'platform-generic-elf'Brad King2021-10-201-0/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3f9b40dab7 Generic-ELF: Add platform module to configure the .elf file extension Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6630
| * | | | Generic-ELF: Add platform module to configure the .elf file extensionJordan Williams2021-10-191-0/+7
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `.elf` extension is a common convention used for embedded binaries. Both Arm and RISC-V use the ELF file format for executables. Configuring the `.elf` file extension is typically done incorrectly. Most embedded developers set this in toolchain files, which is not the correct place. This is typically accomplished through a hack by setting the individual language file extensions for C, CXX, and ASM. Multiple CMake issues in the past have been opened related to this. * #16538 * #20163 * #17880 A platform module makes it simpler and less error prone for developers targeting these ubiquitous bare-metal platforms. This PR attempts to solve this globally with a generic platform. This could also be solved by using more specific platform modules, such as one for each of bare-metal Arm and RISC-V.
* | | | LCC: Add dedicated support for MCST LCC compilermakise-homura2021-10-154-0/+22
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Divert LCC compiler as a new one, instead of treating it as GNU. Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been passing checks for GNU compilers, so it has been identified as GNU. Now, with intent of seriously upstreaming its support, it has been added as a separate LCC compiler, and its version displays not a supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead of GNU 7.3.0). This commit adds its support for detection, and also converts basically every check like 'is this compiler GNU?' to 'is this compiler GNU or LCC?'. The only places where this check is untouched, is where it regards other platforms where LCC is unavailable (primarily non-Linux), and where it REALLY differs from GNU compiler. Note: this transition may break software that are already ported to Elbrus, but hardly relies that LCC will be detected as GNU; still such software is not known.
* | | Merge topic 'clang-manifest'Brad King2021-09-211-2/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | b73857561f Clang: embed windows manifests with GNU interface Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6534
| * | | Clang: embed windows manifests with GNU interfaceThomas Bernard2021-09-161-2/+4
| |/ / | | | | | | | | | Solves: #22611
* | | Merge topic 'platform-vars'Brad King2021-09-211-24/+20
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a136b6ec98 MINGW: Define variable only when targeting Windows platforms 39c5dad0cb Ninja: Remove redundant check for GNU-like compiler on Windows 0b7ae84a96 Cygwin: Remove redundant definitions of CYGWIN and UNIX variables Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6538
| * | | MINGW: Define variable only when targeting Windows platformsBrad King2021-09-171-24/+20
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `MINGW` variable indicates that the compiler targets MinGW, a GNU ABI on Windows. Since commit aff3147917 (Modernize GNU compiler info on Windows, 2009-12-02, v2.8.2~636), we load the `Platform/Windows-GNU` module for compilers targetin MinGW, so set the variable there instead. This is equivalent to `Platform/Windows-MSVC` setting the `MSVC` variable. Also remove `if(MINGW)` checks from the module, which have not been necessary since the enclosed logic was moved to that module. The undocumented `CMAKE_COMPILER_IS_MINGW` internal variable is now unused, so remove it too. Fixes: #22647
* | | Merge topic 'android-PATH'Brad King2021-09-171-5/+0
|\ \ \ | |/ / |/| / | |/ | | | | | | 94f3776774 Android: Restore searching PATH for executables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6528