Skip to content
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

[Bug]: PDBs not installed with Windows CMake build #4599

Open
aursulis opened this issue Aug 19, 2024 · 0 comments
Open

[Bug]: PDBs not installed with Windows CMake build #4599

aursulis opened this issue Aug 19, 2024 · 0 comments

Comments

@aursulis
Copy link

Describe the issue

Built googletest using the CMake-based build system on Windows. Then installed it using a prefix. Was expecting PDBs to be copied alongside the static libraries under the lib folder, but they weren't.

Steps to reproduce the problem

googletest checked out to c:\tmp\googletest, cwd is c:\tmp

cmake -G "Visual Studio 17 2022" -A x64 -T host=x64 -DCMAKE_CXX_FLAGS="/guard:cf /guard:ehcont" -DCMAKE_DEBUG_POSTFIX="d" -DCMAKE_SYSTEM_VERSION="10.0.22621.0" -S .\googletest\ -B .\out\x64\
cmake --build .\out\x64\ --config RelWithDebInfo --parallel
cmake --install .\out\x64\ --config RelWithDebInfo --prefix .\artifacts_x64

Expected gtest.pdb at c:\tmp\artifacts_x64\lib\ - but not found.

What version of GoogleTest are you using?

v1.15.0

What operating system and version are you using?

Windows 10 19045.4780

What compiler and version are you using?

Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33135 for x64
(shipped with VS 2022 17.8.7)

What build system are you using?

cmake version 3.24.2

Additional context

Looks like this got broken by this pull request: #3940, which (correctly I suppose) rearranged where PDBs are put when building, but forgot to update this CMake install step near the end of the file: https://github.com/google/googletest/blob/main/googletest/cmake/internal_utils.cmake#L316. My suspicion is though that fixing that one line will fix the PDB install problem for static libraries, but break it for other binaries, so it doesn't look like quite the correct fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant