mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
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
This commit is contained in:
committed by
Brad King
parent
a91eb5e41f
commit
11f4c19d7b
@@ -69,15 +69,15 @@ else()
|
||||
endif()
|
||||
|
||||
set(CMAKE_${lang}_ARCHIVE_CREATE_IPO
|
||||
"${__ar} cr <TARGET> <LINK_FLAGS> <OBJECTS>"
|
||||
"\"${__ar}\" cr <TARGET> <LINK_FLAGS> <OBJECTS>"
|
||||
)
|
||||
|
||||
set(CMAKE_${lang}_ARCHIVE_APPEND_IPO
|
||||
"${__ar} r <TARGET> <LINK_FLAGS> <OBJECTS>"
|
||||
"\"${__ar}\" r <TARGET> <LINK_FLAGS> <OBJECTS>"
|
||||
)
|
||||
|
||||
set(CMAKE_${lang}_ARCHIVE_FINISH_IPO
|
||||
"${__ranlib} <TARGET>"
|
||||
"\"${__ranlib}\" <TARGET>"
|
||||
)
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user