diff options
author | Michael Maltese <michaeljosephmaltese@gmail.com> | 2017-01-23 18:58:18 -0800 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-06 13:12:06 -0500 |
commit | 72ed051b12d983d298b9447d3464a38f5e0f918c (patch) | |
tree | f9eeb4ee2a05d9c9785d674cfe259cf0fd46f21f /Modules/CMakeDetermineASMCompiler.cmake | |
parent | 0f4dae0a4da92af5079eb730443ec188b3b46f8e (diff) | |
download | cmake-72ed051b12d983d298b9447d3464a38f5e0f918c.tar.gz |
CMakeDetermineCompilerId: check with and without user-specified flags
Clang may raise an error when passed a `-march=` option that doesn't
correspond to the current target triple. CMake cannot pass the target
triple when determining the compiler id because it doesn't know how yet,
but it does pass along user-specified flags. This breaks when those
user-specified flags include `-march=`. Fix this use case by also
trying to find the compiler id without the user-specified flags.
Fixes: #16587
Diffstat (limited to 'Modules/CMakeDetermineASMCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineASMCompiler.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 4162726c82..3f18a8c239 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -93,8 +93,8 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_ARMCC "(ARM Compiler)|(ARM Assembler)") include(CMakeDetermineCompilerId) - CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT}) - + set(userflags) + CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT} "${userflags}") endif() if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) |