PDB files generated for some but not all projects
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 1.2k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 12
Description
### Describe the bug
When building AWS SDK for C++ version 1.9.267, for Windows, as static libraries, some of the Debug|x64 builds fail to generate a .pdb file along with the .lib file.
### Expected Behavior
All .vcxproj files generated by CMake should specify:
`ProgramDatabase`
within Debug build configurations (also in RelWithDebugInfo build configurations).
.pdb files should be generated by default for all Debug builds on Windows.
### Current Behavior
After running the following two commands from the CMake build directory I created...
`cmake ..\aws-sdk-cpp -DCMAKE_BUILD_TYPE="Debug" -DBUILD_ONLY="s3" -DBUILD_SHARED_LIBS="OFF" -DFORCE_SHARED_CRT="OFF" -DENABLE_TESTING="OFF"`
`"C:\Program Files\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin\MSBuild.exe" ALL_BUILD.vcxproj -target:Rebuild -property:Configuration=Debug;Platform=x64 -maxCpuCount:7`
...I can then find a **.pdb** file IN ONLY THE LAST of the following three output folders:
```
..\CodeRepos\sdk_build_debug\aws-cpp-sdk-core\Debug
..\CodeRepos\sdk_build_debug\aws-cpp-sdk-s3\Debug
..\CodeRepos\sdk_build_debug\crt\aws-crt-cpp\Debug
```
Upon examining the **.vcxproj** files generated by CMake, only the one for `aws-crt-cpp` specifies:
`ProgramDatabase`
..within the `ItemDefinitionGroup` for `Debug|x64`. The other two **.vcxproj** files instead specify:
`OldStyle`
and therefore fail to generate a **.pdb** file.
### Reproduction Steps
See "Current Behavior", reported above, for reproduction steps.
### Possible Solution
..alter the CMake files for each AWS SDK project, so when a VC++ project is generated by CMake, the `ItemDefinitionGroup` for each `Debug|x64` build in each AWS SDK project will specify:
`ProgramDatabase`
rather than:
`OldStyle`
The same should be done for `Debug|Win32` build configurations, as well as all `RelWithDebugInfo` build configurations.
Since the CMake files which back the `aws-crt-cpp` project are already doing this properly, they can be used as a model in this regard for other CMake projects within the AWS SDK for C++.
### Additional Information/Context
_No response_
### AWS CPP SDK version used
1.9.267
### Compiler and Version used
Visual Studio 2022 build 17.2.2 - MSVC 19.29.30143.0
### Operating System and version
Windows 10 version 21H2 build 19044.1706
Contributor guide
Assessment
This issue has not been assessed yet.