<div dir="ltr"><div><div><div><div>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:<br><br>
</div>CMAKE_ASM_MASM_FLAGS<br>CMAKE_ASM_MASM_FLAGS_<CONFIG><br><br></div>(where <CONFIG> is a placeholder for uppercase configuration name).<br><br></div>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><br>
<br></div>Petr<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 26, 2014 at 6:28 AM, Ravi Raman <span dir="ltr"><<a href="mailto:ravi.raman@xoriant.com" target="_blank">ravi.raman@xoriant.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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)<u></u><u></u></p>

<p class="MsoNormal">This is happening successfully.<u></u><u></u></p>
<p class="MsoNormal">But there is a preprocessor directive (_WIN64) as follows within the .asm code, which is not getting set.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">IFDEF _WIN64<u></u><u></u></p>
<p class="MsoNormal">We would like to know which is the ASM related cmake flag variable that needs to be manipulated in order to set _WIN64<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Details as follows:<u></u><u></u></p>
<p><u></u><span>1.<span style="font:7.0pt "Times New Roman"">      
</span></span><u></u>In CMakeLists.txt, we do the following to enable microsoft macro assembler to compile .asm files<u></u><u></u></p>
<p>enable_language(ASM_MASM)<u></u><u></u></p>
<p><u></u><span>2.<span style="font:7.0pt "Times New Roman"">      
</span></span><u></u>We include the .asm file Testx64.asm in the source list<u></u><u></u></p>
<p><u></u><span>3.<span style="font:7.0pt "Times New Roman"">      
</span></span><u></u>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<u></u><u></u></p>
<p>_MASM:<u></u><u></u></p>
<p>  Assembling ..\..\..\testx64\Testx64.asm...<u></u><u></u></p>
<p>  cmd.exe /C "C:\Users\raman_r\AppData\Local\Temp\tmp8a9b40c55523496e9edce668c1f812a2.cmd"<u></u><u></u></p>
<p>  ml64.exe /c /nologo /Zi /Fo"testx64.dir\Release\Testx64.obj" /W3 /errorReport:prompt  /Ta..\..\..\testx64\Testx64.asm<u></u><u></u></p>
<p><u></u> <u></u></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<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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 ?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Thanks & Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="color:#1f497d">Ravi Raman <u></u><u></u></span></b></p>
<p class="MsoNormal"><b><span style="color:#1f497d">Xoriant Solutions Pvt. Ltd<u></u><u></u></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.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:black">Tel: <a href="tel:%2B91%2022%2030511000" value="+912230511000" target="_blank">+91 22 30511000</a>,9930100026 Extn: 2144 Voip No. <a href="tel:4088344495" value="+14088344495" target="_blank">4088344495</a>/96/97/98 Voip Extn:1178| Fax: <a href="tel:%2B91%2022%2030511111" value="+912230511111" target="_blank">+91 22 30511111</a>
<u></u><u></u></span></p>
<p class="MsoNormal"><a href="mailto:ram.singh@xoriant.com" target="_blank"><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:blue">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><span style="color:#1f497d"><u></u><u></u></span></p>

<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

<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><br></blockquote></div><br></div>