[CMake] Incorrect object file name on cmake compilation
Bill Hoffman
bill.hoffman at kitware.com
Thu Sep 11 11:40:44 EDT 2014
On 9/11/2014 7:04 AM, Ravi Raman wrote:
> Yes. That's correct David. I was actually looking for an explanation
> why the object file name is coming with the suffix .cpp.obj instead
> of the conventional .obj. It was kind of a problem for me because the
> object file comparison tool uses the object file name as the
> reference for object file comparison.
The reason is to assure that we have unique names for the object files.
Imagine a project that had main.c main.cxx and main.F90. They could not
all go to main.o. Instead of having to search for duplicates like that
and special case them, CMake uses a consistent and unique name for the
object files. Really old CMake used to create main.o and issues like
this showed up.
-Bill
More information about the CMake
mailing list