summaryrefslogtreecommitdiff
path: root/Modules/CMakeASMInformation.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-07-01 13:52:10 -0400
committerBrad King <brad.king@kitware.com>2016-07-01 14:01:41 -0400
commit3643390d49b567214f9008091aa0e1f4ebe7782a (patch)
treee310832801d5fa8af2e33601391685a3b753669c /Modules/CMakeASMInformation.cmake
parent4c476cc9b2441f7cf36fd87c7c7338c373905678 (diff)
downloadcmake-3643390d49b567214f9008091aa0e1f4ebe7782a.tar.gz
Strip CMAKE_<LANG>_FLAGS[_<CONFIG>] initializer whitespace
Diffstat (limited to 'Modules/CMakeASMInformation.cmake')
-rw-r--r--Modules/CMakeASMInformation.cmake9
1 files changed, 5 insertions, 4 deletions
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index 0e547c4671..1bb16ac245 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -76,10 +76,11 @@ endif()
# Support for CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT and friends:
set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT "$ENV{ASM${ASM_DIALECT}FLAGS} ${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}")
-# avoid just having a space as the initial value for the cache
-if(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ")
- set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT)
-endif()
+
+foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO)
+ string(STRIP "${CMAKE_ASM${ASM_DIALECT}_FLAGS${c}_INIT}" CMAKE_ASM${ASM_DIALECT}_FLAGS${c}_INIT)
+endforeach()
+
set (CMAKE_ASM${ASM_DIALECT}_FLAGS "${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}" CACHE STRING
"Flags used by the assembler during all build types.")