From 11f4c19d7babf5412efeebdb030dddfb9b7db366 Mon Sep 17 00:00:00 2001 From: Thomas Stenersen Date: Fri, 6 Oct 2017 08:29:27 +0200 Subject: IPO: Fix support for spaces in path to archive tools In the normal archiving rules the ```` 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 --- Modules/Compiler/Clang.cmake | 6 +++--- Modules/Compiler/GNU.cmake | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index 7d476f9..9f5e921 100644 --- a/Modules/Compiler/Clang.cmake +++ b/Modules/Compiler/Clang.cmake @@ -69,15 +69,15 @@ else() endif() set(CMAKE_${lang}_ARCHIVE_CREATE_IPO - "${__ar} cr " + "\"${__ar}\" cr " ) set(CMAKE_${lang}_ARCHIVE_APPEND_IPO - "${__ar} r " + "\"${__ar}\" r " ) set(CMAKE_${lang}_ARCHIVE_FINISH_IPO - "${__ranlib} " + "\"${__ranlib}\" " ) endmacro() endif() 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 " + "\"${CMAKE_${lang}_COMPILER_AR}\" cr " ) set(CMAKE_${lang}_ARCHIVE_APPEND_IPO - "${CMAKE_${lang}_COMPILER_AR} r " + "\"${CMAKE_${lang}_COMPILER_AR}\" r " ) set(CMAKE_${lang}_ARCHIVE_FINISH_IPO - "${CMAKE_${lang}_COMPILER_RANLIB} " + "\"${CMAKE_${lang}_COMPILER_RANLIB}\" " ) endif() endmacro() -- cgit v0.12