Files
CMake/Tests/MSVCDebugInformationFormat/PdbCompileFileName.c
Ben Boeckel 1a8712d31a cmGeneratorTarget: always provide a compile PDB filename
As of commit f78f592b78 (pchreuse: defer target existence enforcement to
generation time, 2025-06-16) via !10887, the compile PDB directory is
always set. Some codepaths used the total computation as a signal to
build the path themselves. But the filename was not specified, so the
resulting filename ended up changing. Always create the filename as
expected.

Fixes: #27401
2025-11-24 22:43:52 -05:00

16 lines
290 B
C

#include <stdio.h>
int main(int argc, char* argv[])
{
int ret = 0;
char const* fname = TARGET_DIRECTORY "/PdbCompileFileName.pdb";
FILE* f = fopen(fname, "r");
if (f) {
fclose(f);
} else {
printf("Failed to open PDB file '%s'\n", fname);
ret = 1;
}
return ret;
}