From 0078db3888e01343d26c1f695b250663bbcb7ac2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 27 Apr 2021 13:56:32 -0400 Subject: ARMClang: Separate cpu/arch flags from preceding flags Suggested-by: Kim Kryger --- Modules/Compiler/ARMClang.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/Compiler/ARMClang.cmake b/Modules/Compiler/ARMClang.cmake index da7a43c..66b7c2e 100644 --- a/Modules/Compiler/ARMClang.cmake +++ b/Modules/Compiler/ARMClang.cmake @@ -89,12 +89,12 @@ macro(__compiler_armclang lang) else() __armclang_check_processor("${CMAKE_SYSTEM_ARCH}" "${CMAKE_${lang}_COMPILER_ARCH_LIST}" _CMAKE_${lang}_CHECK_ARCH_RESULT) if( _CMAKE_${lang}_CHECK_ARCH_RESULT) - string(APPEND CMAKE_${lang}_FLAGS_INIT "-march=${CMAKE_SYSTEM_ARCH}") + string(APPEND CMAKE_${lang}_FLAGS_INIT " -march=${CMAKE_SYSTEM_ARCH}") set(__march_flag_set TRUE) endif() __armclang_check_processor("${CMAKE_SYSTEM_PROCESSOR}" "${CMAKE_${lang}_COMPILER_PROCESSOR_LIST}" _CMAKE_${lang}_CHECK_PROCESSOR_RESULT) if(_CMAKE_${lang}_CHECK_PROCESSOR_RESULT) - string(APPEND CMAKE_${lang}_FLAGS_INIT "-mcpu=${CMAKE_SYSTEM_PROCESSOR}") + string(APPEND CMAKE_${lang}_FLAGS_INIT " -mcpu=${CMAKE_SYSTEM_PROCESSOR}") set(__mcpu_flag_set TRUE) endif() if(NOT __march_flag_set AND NOT __mcpu_flag_set) @@ -111,7 +111,7 @@ macro(__compiler_armclang lang) list(TRANSFORM CMAKE_LINKER_CPU_LIST TOLOWER) __armclang_check_processor("${CMAKE_SYSTEM_PROCESSOR}" "${CMAKE_LINKER_CPU_LIST}" _CMAKE_CHECK_LINK_CPU_RESULT) if(_CMAKE_CHECK_LINK_CPU_RESULT) - string(APPEND CMAKE_${lang}_LINK_FLAGS "--cpu=${CMAKE_SYSTEM_PROCESSOR}") + string(APPEND CMAKE_${lang}_LINK_FLAGS " --cpu=${CMAKE_SYSTEM_PROCESSOR}") endif() if(__CMAKE_ARMClang_USING_armlink) -- cgit v0.12