<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=utf-8">
<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;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.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-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Thanks Petr for your comments. We had already tried this approach. But it did not work.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">We set the option “/D _WIN64” in CMAKE_ASM_MASM_FLAGS but it has no impact on the execution of ml64.exe</span>.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">ml64.exe execution always shows only the following options i.e. does not include “/D _WIN64”</span>.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">ml64.exe /c /nologo /Zi /Fo"testx64.dir\Release\Testx64.obj" /W3 /errorReport:prompt  /Ta..\..\..\testx64\Testx64.asm<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">We also tried setting the cmake variable CMAKE_ASM_MASM_COMPILER_ARG1 with the option “/D _WIN64”<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">But with that also, there is no change, the result is the same.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">So, somehow we need to find a way to stuff “/D _WIN64” in the compile options of ml64.exe<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Thanks & Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Ravi Raman
<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Xoriant Solutions Pvt. Ltd<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";
color:black">4th Floor, Winchester, Hiranandani Business Park, Powai, Mumbai 400076, INDIA.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";
color:black">Tel: +91 22 30511000,9930100026 Extn: 2144 Voip No. 4088344495/96/97/98 Voip Extn:1178| Fax: +91 22 30511111
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><a href="mailto:ram.singh@xoriant.com"><span style="font-size:
10.0pt;font-family:"Trebuchet MS","sans-serif"">ravi.raman@xoriant.com</span></a></span><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:black">| </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a href="http://www.xoriant.com/"><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";
color:black">http://www.xoriant.com</span></a></span><span style="font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </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""> Petr Kmoch [mailto:petr.kmoch@gmail.com]
<br>
<b>Sent:</b> Wednesday, August 27, 2014 12:16 PM<br>
<b>To:</b> Ravi Raman<br>
<b>Cc:</b> cmake@cmake.org<br>
<b>Subject:</b> Re: [CMake] Need to know the ASM flag that needs to be modified in cmake<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Ravi,<br>
<br>
I've never used ASM_MASM (or any other language beside C, CXX and Fortran), but if it follows normal CMake language rules, the following variables should exist:<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">CMAKE_ASM_MASM_FLAGS<br>
CMAKE_ASM_MASM_FLAGS_<CONFIG><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">(where <CONFIG> is a placeholder for uppercase configuration name).<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">See the list of per-language variables in the docs:
<a href="http://www.cmake.org/cmake/help/v3.0/manual/cmake-variables.7.html#variables-for-languages">
http://www.cmake.org/cmake/help/v3.0/manual/cmake-variables.7.html#variables-for-languages</a><o:p></o:p></p>
</div>
<p class="MsoNormal">Petr<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Aug 26, 2014 at 6:28 AM, Ravi Raman <<a href="mailto:ravi.raman@xoriant.com" target="_blank">ravi.raman@xoriant.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">In our cmake project, there is an assembler file (.asm extension) that needs to be compiled to create object file (.obj) using microsoft macro assembler (ml.exe for 32-bit and ml64.exe
 for 64-bit)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">This is happening successfully.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">But there is a preprocessor directive (_WIN64) as follows within the .asm code, which is not getting set.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:.5in">
IFDEF _WIN64<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">We would like to know which is the ASM related cmake flag variable that needs to be manipulated in order to set _WIN64<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Details as follows:<o:p></o:p></p>
<p>1.<span style="font-size:7.0pt">       </span>In CMakeLists.txt, we do the following to enable microsoft macro assembler to compile .asm files<o:p></o:p></p>
<p>enable_language(ASM_MASM)<o:p></o:p></p>
<p>2.<span style="font-size:7.0pt">       </span>We include the .asm file Testx64.asm in the source list<o:p></o:p></p>
<p>3.<span style="font-size:7.0pt">       </span>Because of the above enable_language step, the MASM step gets correctly triggered as follows with the following ml64.exe options to compile the .asm to create corresponding .obj<o:p></o:p></p>
<p>_MASM:<o:p></o:p></p>
<p>  Assembling ..\..\..\testx64\Testx64.asm...<o:p></o:p></p>
<p>  cmd.exe /C "C:\Users\raman_r\AppData\Local\Temp\tmp8a9b40c55523496e9edce668c1f812a2.cmd"<o:p></o:p></p>
<p>  ml64.exe /c /nologo /Zi /Fo"testx64.dir\Release\Testx64.obj" /W3 /errorReport:prompt  /Ta..\..\..\testx64\Testx64.asm<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>Note that in the above step 3, ml64.exe execution creates the output object file Testx64.obj, but in this there is no pre-processor switch /D _WIN64<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Is there a way in cmake to manipulate any ASM related cmake flag, so that the above ml64.exe execution has /D _WIN64 option set ?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">Thanks & Regards</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="color:#1F497D">Ravi Raman
</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="color:#1F497D">Xoriant Solutions Pvt. Ltd</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:black">4th Floor, Winchester, Hiranandani Business Park, Powai, Mumbai 400076, INDIA.
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:black">Tel:
<a href="tel:%2B91%2022%2030511000" target="_blank">+91 22 30511000</a>,9930100026 Extn: 2144 Voip No.
<a href="tel:4088344495" target="_blank">4088344495</a>/96/97/98 Voip Extn:1178| Fax:
<a href="tel:%2B91%2022%2030511111" target="_blank">+91 22 30511111</a> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="mailto:ram.singh@xoriant.com" target="_blank"><span style="font-size:
10.0pt;font-family:"Trebuchet MS","sans-serif"">ravi.raman@xoriant.com</span></a><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:black">| </span><a href="http://www.xoriant.com/" target="_blank"><span style="font-size:10.0pt;
font-family:"Trebuchet MS","sans-serif";color:black">http://www.xoriant.com</span></a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">
http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">
http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">
http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">
http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>