mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:19:00 +08:00
c764ada376
- [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md) - [x] SHA512s are updated for each updated download - [x] The "supports" clause reflects platforms that may be fixed by this new version - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file. ``` ld: warning: direct access in function 'fmt::v10::detail::format_error_code(fmt::v10::detail::buffer<char>&, int, fmt::v10::basic_string_view<char>)' from file '/usr/local/vcpkg/installed/x64-osx/lib/libfmt.a(format.cc.o)' to global weak symbol 'decltype(fp.begin()) fmt::v10::detail::parse_format_specs<int, fmt::v10::detail::compile_parse_context<char> >(fmt::v10::detail::compile_parse_context<char>&)' from file '/usr/local/vcpkg/installed/x64-osx/lib/libspdlog.a(spdlog.cpp.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings. ``` When link with `spdlog`, it shows this warning. This problem was once reported in #29280 by @marcovc And this pr fix it.
14 lines
522 B
Diff
14 lines
522 B
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 88c12148..967b53dd 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -260,7 +260,7 @@ if (FMT_MASTER_PROJECT AND CMAKE_GENERATOR MATCHES "Visual Studio")
|
|
join(netfxpath
|
|
"C:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\"
|
|
".NETFramework\\v4.0")
|
|
- file(WRITE run-msbuild.bat "
|
|
+ file(WRITE "${CMAKE_BINARY_DIR}/run-msbuild.bat" "
|
|
${MSBUILD_SETUP}
|
|
${CMAKE_MAKE_PROGRAM} -p:FrameworkPathOverride=\"${netfxpath}\" %*")
|
|
endif ()
|