[CMake] Specifying ObjectFile for Visual Studio 7

Phillip Hellewell sshock at gmail.com
Fri Apr 14 14:11:20 EDT 2006


Hi all,

I need help building a project with two filenames with the same name (they
are in different subdirectories).  Unfortunately, since VS builds all object
files into the same directory, one of the object files will get clobbered
and in addition I get a LNK4042 error (object specified more than once;
extras ignored).

Short of renaming my source file, is there a way to solve this with the
latest version of cmake?  I've tried something similar to the following:

SET_SOURCE_FILES_PROPERTIES( myfile.cpp PROPERTIES COMPILE_FLAGS "/Fo\"
myfile2.obj\"" )

to force it to use a different object filename.  The /Fo thing does show up
in the command line additional options section, but I think Visual Studio is
ignoring it, becuase it still ends up using /Fo"Release\" and /Fo"Debug\" no
matter what.

Ideas?

Phillip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060414/ec6621f8/attachment.htm


More information about the CMake mailing list