diff options
| author | Lingkai Dong <lingkai.dong@arm.com> | 2021-07-13 14:32:04 (GMT) |
|---|---|---|
| committer | Brad King <brad.king@kitware.com> | 2021-07-14 13:45:09 (GMT) |
| commit | 509ef50a06fd690a85ca245a7221d001a3d6937f (patch) | |
| tree | 63fe52f0d2af0459a0c56d7cd4288d28496b2258 /Tests/Module/WriteCompilerDetectionHeader | |
| parent | 00e8292434871887f174cfc1a8b3941abefe4cb1 (diff) | |
| download | CMake-509ef50a06fd690a85ca245a7221d001a3d6937f.zip CMake-509ef50a06fd690a85ca245a7221d001a3d6937f.tar.gz CMake-509ef50a06fd690a85ca245a7221d001a3d6937f.tar.bz2 | |
ARMClang: Fix regression in check for working compiler
Given the compiler to use, `CMakeFindBinUtils.cmake` automatically
determines a number of tools including linker (CMAKE_LINKER) and archiver
(CMAKE_AR) and stores them in a generated file `CMakeCCompiler.cmake` as
non-CACHE entries. The compiler-specific ARMClang.cmake then tries to
override CMAKE_LINKER and CMAKE_AR as CACHE entries.
Following the introduction of CMP0126, which is set to NEW in the test
for a working compiler, setting a CACHE entry does not replace a normal
entry of the same name anymore, resulting in a failed test due to wrong
linker and archiver.
To fix this, set CMAKE_LINKER and CMAKE_AR for ARMClang directly in
`CMakeFindBinUtils.cmake` as is done for other compilers. Check
for them in `ARMClang.cmake` to safeguard cases when a project explicitly
includes `ARMClang.cmake` prior to compiler determination (which some
projects do to work around other problems in older CMake versions).
Diffstat (limited to 'Tests/Module/WriteCompilerDetectionHeader')
0 files changed, 0 insertions, 0 deletions
