summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/GNU.cmake
diff options
context:
space:
mode:
authorThomas Stenersen <thomas.stenersen@nordicsemi.no>2017-10-06 06:29:27 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-06 12:15:55 (GMT)
commit11f4c19d7babf5412efeebdb030dddfb9b7db366 (patch)
tree4c7583e8de5e37574e2bd33109a8181c7e96a344 /Modules/Compiler/GNU.cmake
parenta91eb5e41f486628910f189bf40403568af013c7 (diff)
downloadCMake-11f4c19d7babf5412efeebdb030dddfb9b7db366.zip
CMake-11f4c19d7babf5412efeebdb030dddfb9b7db366.tar.gz
CMake-11f4c19d7babf5412efeebdb030dddfb9b7db366.tar.bz2
IPO: Fix support for spaces in path to archive tools
In the normal archiving rules the ``<CMAKE_AR>`` placeholder is replaced by the generators with a properly-quoted path to the tool. In the IPO rules we specify the tools directly, so we need to quote them. Fixes: #17326
Diffstat (limited to 'Modules/Compiler/GNU.cmake')
-rw-r--r--Modules/Compiler/GNU.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index 675e505..d962688 100644
--- a/Modules/Compiler/GNU.cmake
+++ b/Modules/Compiler/GNU.cmake
@@ -75,15 +75,15 @@ macro(__compiler_gnu lang)
#
# [1]: https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/Optimize-Options.html
set(CMAKE_${lang}_ARCHIVE_CREATE_IPO
- "${CMAKE_${lang}_COMPILER_AR} cr <TARGET> <LINK_FLAGS> <OBJECTS>"
+ "\"${CMAKE_${lang}_COMPILER_AR}\" cr <TARGET> <LINK_FLAGS> <OBJECTS>"
)
set(CMAKE_${lang}_ARCHIVE_APPEND_IPO
- "${CMAKE_${lang}_COMPILER_AR} r <TARGET> <LINK_FLAGS> <OBJECTS>"
+ "\"${CMAKE_${lang}_COMPILER_AR}\" r <TARGET> <LINK_FLAGS> <OBJECTS>"
)
set(CMAKE_${lang}_ARCHIVE_FINISH_IPO
- "${CMAKE_${lang}_COMPILER_RANLIB} <TARGET>"
+ "\"${CMAKE_${lang}_COMPILER_RANLIB}\" <TARGET>"
)
endif()
endmacro()