<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:blue'>I
have no idea how to construct an example, I&#8217;m afraid, though I&#8217;m
willing to try. But there&#8217;s nothing in the project files that makes such
a distinction as far as I can tell.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:blue'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:blue'>The
compiler is the same &#8211; it&#8217;s a cross-compiler, and is being invoked
as a script, since it&#8217;s a 2-pass deal (compiles to assembler, assemble
that).<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:blue'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:blue'>As
far as I can tell, the obj file suffix is chosen by make &#8211; it invokes the
compiler with -o filename.c.o[bj]. The CMake call generates the Makefiles, of
course, which is why I assumed that it was CMake making this decision. The .obj
do appear in the Makefiles, and not anywhere in CMakeLists.txt that I can see
(other than in some &#8216;make clean&#8217; stuff I added).<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:blue'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:blue'>&#8230;phsiii<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:blue'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> David Cole
[mailto:david.cole@kitware.com] <br>
<b>Sent:</b> Friday, October 10, 2008 1:02 PM<br>
<b>To:</b> Phil Smith<br>
<b>Cc:</b> CMake<br>
<b>Subject:</b> Re: [CMake] Object files: .o vs .obj?<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div>

<p class=MsoNormal>No, it doesn't make sense. Can you construct a minimal
example that demonstrates this?<o:p></o:p></p>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>If not, there must be something in your project files that
differentiates between in-source and out-of-source builds...?<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>Are you changing compilers based on in-source/out-of-source?<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>The in-source/out-of-source change should have no effect on
the suffix used for object files. Isn't the obj file suffix typically chosen by
the compiler...?<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div>

<p class=MsoNormal>On Fri, Oct 10, 2008 at 12:50 PM, Phil Smith &lt;<a
href="mailto:phil@voltage.com">phil@voltage.com</a>&gt; wrote:<o:p></o:p></p>

<p class=MsoNormal>Hm. If I do an out-of-source build, I get .o files. &nbsp;If
I do an in-source build, I get .obj.<br>
<br>
(Yes, I know in-source builds are considered Evil; the lead engineer wants to
do 'em that way, not sure why, so I was testing to see if they'd work, noticed
that I was getting .obj files.)<br>
<br>
Does this make any sense?<br>
<br>
...phsiii<o:p></o:p></p>

<div>

<div>

<p class=MsoNormal>-----Original Message-----<br>
From: <a href="mailto:cmake-bounces@cmake.org">cmake-bounces@cmake.org</a>
[mailto:<a href="mailto:cmake-bounces@cmake.org">cmake-bounces@cmake.org</a>]
On Behalf Of Phil Smith<br>
Sent: Thursday, October 09, 2008 12:27 PM<br>
To: CMake<br>
Subject: [CMake] Object files: .o vs .obj?<br>
<br>
With (allegedly) identical CMake setups, we have two machines that generate
different outputs: .o vs. obj. The one that generates .obj has Visual Studio
installed, the other doesn't.<br>
<br>
I tried adding<br>
&nbsp; &nbsp; &nbsp; &nbsp;SET(CMAKE_C_OUTPUT_EXTENSION &quot;.obj&quot;)<br>
to my Toolchain file, but it made no difference.<br>
<br>
The CMake invocation is:<br>
<br>
cmake -DCMAKE_TOOLCHAIN_FILE:string=&quot;%DIGNUS_SOURCE%\zosport.cmake&quot;
-G&quot;Unix Makefiles&quot; %DIGNUS_SOURCE%\vtk-core\<br>
<br>
I even added:<br>
&nbsp;message(STATUS &quot;Generator is ${CMAKE_GENERATOR}&quot;)<br>
in the &quot;.obj&quot; machine's CMakeLists.txt (that's the machine with
Visual Studio installed), again, no difference.<br>
<br>
I'd slightly rather force .obj than .o, but in any case, I need it to be
predictable. Any ideas?<br>
--<br>
...phsiii<br>
<br>
Phil Smith III<br>
<a href="mailto:phil@voltage.com">phil@voltage.com</a><br>
Voltage Security, Inc.<br>
<a href="http://www.voltage.com" target="_blank">www.voltage.com</a><br>
(703) 476-4511 (home office)<br>
(703) 568-6662 (cell)<br>
<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><o:p></o:p></p>

</div>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</div>

</div>

</body>

</html>