-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix an issue with GMOCK_LIB NOTFOUND with Visual Studio 2019 #766
Conversation
Codecov Report
@@ Coverage Diff @@
## main #766 +/- ##
==========================================
+ Coverage 95.95% 95.97% +0.01%
==========================================
Files 176 176
Lines 7172 7172
==========================================
+ Hits 6882 6883 +1
+ Misses 290 289 -1
|
@maxgolov #726 was intended for MSVC as well, as using the cached variable could cause linking to incorrect flavor of gmock.lib when updating It seems the your case, cmake was invoked for multiple times, and |
@ThomsonTan - I'm using recent (probably close to latest ) Visual Studio 2019 with CMake+ninja. Clean build, all artifacts deleted. No CMake cache generated yet. Opening the project as directory, then using built-in CMake generate and Build All. I'm building There is a markdown document describing the process in my PR here #755 I see what you are saying, since you unset the variable - and the next stage right under is supposed to populate it.. so it should work, in theory, but it's been breaking for me. |
I'll try to reproduce it in a fresh VM based on #755. |
I just did the build in a fresh VM with VS 2019 community edition, opened the opentelemetry-folder with VS 2019, garneted Copy-Item : The process cannot access the file
'C:\gh\opentelemetry-cpp\out\vs2019\nostd-x64-Debug\exporters\ostream\gtestd.dll' because it is being used by another
process.
At C:\gh\opentelemetry-cpp\tools\vcpkg\scripts\buildsystems\msbuild\applocal.ps1:29 char:9
+ Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Copy-Item], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.CopyItemCommand |
Can we close this PR now that #771 has these changes included ? |
closing this as #771 has these changes. |
Yeah, we should be able to close it. @ThomsonTan - could you please verify the latest rc1 build on your machine? |
Verified rc1 build and test passed on my machine. |
Changes
@ThomsonTan - I am hitting this issue with CMake+vcpkg in Visual Studio 2019 when I enable OTLP on Windows.
Full log:
I assume your recent change ( #726 ) - was somehow affecting Linux / gcc build. But not MSVC. Thus, I'm changing this a tiny bit - to apply your previous patch only to non-MSVC path. After I applied this change, I get it all building and working well witch CMake + Visual Studio 2019 (MSVC) + ninja. All tests are Okay. Please let me know if it makes sense. If you think this is not good, kindly elaborate on what exact issue you had originally with this variable defined.