Hi,

cmake works nice so far :-) Thanks guys!

Recently my MSVC builds have been quite slow, so I decided to move the PDB files to a ramdisk. (This really speeds things up, I'm using a quad-core CPU so mspdbsrv.exe gets in the way quite often.)

I found out that setting the PDB pathname in CMake is not possible. I would like to specify something like

  ProgramDataBaseFileName="R:\$(TargetName)-$(ConfigurationName)"

(MSVC appends ".pdb" or ".idb" as necessary). However, contrary to what I've seen on the wiki, setting TARGET_PDB (using SET or SET_TARGET_PROPERTIES) does nothing.

So I checked the source code, and the generator (cmLocalVisualStudio7Generator.cxx) does this (at about 3 places):

    fout <<  "\t\t\t\tProgramDataBaseFileName=\""
         << target.GetDirectory(configName) << "/"
         << target.GetPDBName(configName) << "\"\n";

This suggests that even if I managed to change PDB name somehow, I could not change the directory.

So I ended up compiling my own cmake.exe with the above changed to my hard-coded path, but I would really like to see this configurable.


By the way, I can't see why you bother retrieving all pathnames in the generator. Hardcoding something like

fout << "\t\t\t\tProgramDataBaseFileName=\"$(TargetDir)$(TargetName)"\n";

would have exactly the same effect. IMHO this would also be easier to modify so that the users can choose their own preferred PDB location.


Is there some other way of achieving what I need (apart from re-compiling cmake and/or waiting for new options)?

Thanks,
Filip

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to