Hi, Thanks Petr for your comments. We had already tried this approach. But it did not work. We set the option “/D _WIN64” in CMAKE_ASM_MASM_FLAGS but it has no impact on the execution of ml64.exe. ml64.exe execution always shows only the following options i.e. does not include “/D _WIN64”.
ml64.exe /c /nologo /Zi /Fo"testx64.dir\Release\Testx64.obj" /W3 /errorReport:prompt /Ta..\..\..\testx64\Testx64.asm We also tried setting the cmake variable CMAKE_ASM_MASM_COMPILER_ARG1 with the option “/D _WIN64” But with that also, there is no change, the result is the same. So, somehow we need to find a way to stuff “/D _WIN64” in the compile options of ml64.exe 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.ra...@xoriant.com<mailto:ram.si...@xoriant.com>| http://www.xoriant.com<http://www.xoriant.com/> From: Petr Kmoch [mailto:petr.km...@gmail.com] Sent: Wednesday, August 27, 2014 12:16 PM To: Ravi Raman Cc: cmake@cmake.org Subject: Re: [CMake] Need to know the ASM flag that needs to be modified in cmake Hi Ravi, 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: CMAKE_ASM_MASM_FLAGS CMAKE_ASM_MASM_FLAGS_<CONFIG> (where <CONFIG> is a placeholder for uppercase configuration name). See the list of per-language variables in the docs: http://www.cmake.org/cmake/help/v3.0/manual/cmake-variables.7.html#variables-for-languages Petr On Tue, Aug 26, 2014 at 6:28 AM, Ravi Raman <ravi.ra...@xoriant.com<mailto:ravi.ra...@xoriant.com>> wrote: 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<tel:%2B91%2022%2030511000>,9930100026 Extn: 2144 Voip No. 4088344495<tel:4088344495>/96/97/98 Voip Extn:1178| Fax: +91 22 30511111<tel:%2B91%2022%2030511111> ravi.ra...@xoriant.com<mailto:ram.si...@xoriant.com>| http://www.xoriant.com<http://www.xoriant.com/> -- Powered by www.kitware.com<http://www.kitware.com> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake