[CMake] Incorrect object file name on cmake compilation

Andreas Mohr andi at lisas.de
Thu Sep 11 04:01:17 EDT 2014


Hi,

> Date: Thu, 11 Sep 2014 07:49:23 +0000
> From: Ravi Raman <ravi.raman at Xoriant.Com>

> Hi,
> 
> Thanks Petr for your reply. By incorrect I meant instead of the conventional main.obj, we get main.cpp.obj.
> I understood what you are saying. We have found a solution for this in our cmake code.

Good, so you've found a "solution" - to which, umm, I dare ask... "problem" exactly? :)

> We have explicitly set the /Fo compiler flag for main.cpp. With that it creates main.obj for main.cpp and also main.res for main.rc

Why does this need some manual effort (and of manually adding a very specific compiler flag syntax, in fact!)
when it ideally/normally/usually shouldn't,
one would want to ask.
Perhaps this "issue" is indicative of an asymmetric/incomplete mechanism or configuration
in CMake or this specific CMake environment, which one might want to discover and fix,
in order to have the need for any manual tweaking (in all sufficiently standard cases)
avoided in all future deployments...

Thanks,

Andreas Mohr


More information about the CMake mailing list