mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[vcpkg] Fix '/' incorrectly replaced by '-' on Linux. (#24098)
* Fix '/' incorrectly replaced by '-' on Linux. * Update baseline. * Use MATCHES instead of STREQUAL. * Update version hash. * Add comment for future modifications. * Update version hash. * Update version-date. * Update baseline. * Update ports/vcpkg-cmake/cmake_get_vars/CMakeLists.txt Co-authored-by: Billy O'Neal <bion@microsoft.com> * Update version. * Run vcpkg format-manifest ports/vcpkg-cmake/vcpkg.json * Run vcpkg x-add-version vcpkg-cmake Co-authored-by: Nemirtingas <Nemirtingas@noreply.com> Co-authored-by: Billy O'Neal <bion@microsoft.com>
This commit is contained in:
parent
3b8363dd8f
commit
d5ea96667e
@ -143,9 +143,12 @@ foreach(incdir IN LISTS CMAKE_C_STANDARD_INCLUDE_DIRECTORIES)
|
||||
endforeach()
|
||||
|
||||
foreach(flag CXX C SHARED_LINKER EXE_LINKER STATIC_LINKER RC)
|
||||
if(MSVC)
|
||||
# Transform MSVC /flags to -flags due to bash scripts intepreting /flag as a path.
|
||||
# This is imperfect because it fails on directories with trailing spaces, but those are exceedingly rare
|
||||
# When using MSVC, maybe transform /flags to -flags.
|
||||
# When cross compiling, "/flags" may be an absolute path starting with /, so don't transform.
|
||||
# Otherwise, transform to improve compatibility with scripts interpreting "/flags" as a path.
|
||||
if(MSVC AND "${CMAKE_HOST_SYSTEM_NAME}" MATCHES "Windows")
|
||||
# This implementation is imperfect because it fails on directories with trailing spaces,
|
||||
# but those are rare.
|
||||
string(REGEX REPLACE "(^| )/" "\\1-" ${flag}_FLAGS "${${flag}_FLAGS}")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
if("${flag}" STREQUAL "CXX")
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"version-date": "2022-05-05",
|
||||
"version-date": "2022-05-06",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
@ -7317,7 +7317,7 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"vcpkg-cmake": {
|
||||
"baseline": "2022-05-05",
|
||||
"baseline": "2022-05-06",
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-cmake-config": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "46a5686341cf9136053ff01b9f213dbd2dbea8a6",
|
||||
"version-date": "2022-05-06",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "ecfb2282f599a9c1f3a9ad98eac9d2b35690850f",
|
||||
"version-date": "2022-05-05",
|
||||
|
Loading…
x
Reference in New Issue
Block a user