[CMake] Need to know the ASM flag that needs to be modified in cmake

Ravi Raman ravi.raman at Xoriant.Com
Tue Aug 26 00:28:43 EDT 2014


Hi,

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)
This is happening successfully.
But there is a preprocessor directive (_WIN64) as follows within the .asm code, which is not getting set.
IFDEF _WIN64
We would like to know which is the ASM related cmake flag variable that needs to be manipulated in order to set _WIN64

Details as follows:

1.       In CMakeLists.txt, we do the following to enable microsoft macro assembler to compile .asm files

enable_language(ASM_MASM)

2.       We include the .asm file Testx64.asm in the source list

3.       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

_MASM:

  Assembling ..\..\..\testx64\Testx64.asm...

  cmd.exe /C "C:\Users\raman_r\AppData\Local\Temp\tmp8a9b40c55523496e9edce668c1f812a2.cmd"

  ml64.exe /c /nologo /Zi /Fo"testx64.dir\Release\Testx64.obj" /W3 /errorReport:prompt  /Ta..\..\..\testx64\Testx64.asm



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

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 ?

Thanks & Regards

Ravi Raman
Xoriant Solutions Pvt. Ltd
4th Floor, Winchester, Hiranandani Business Park, Powai, Mumbai 400076, INDIA.
Tel: +91 22 30511000,9930100026 Extn: 2144 Voip No. 4088344495/96/97/98 Voip Extn:1178| Fax: +91 22 30511111
ravi.raman at xoriant.com<mailto:ram.singh at xoriant.com>| http://www.xoriant.com<http://www.xoriant.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140826/9f756371/attachment.html>


More information about the CMake mailing list