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

Petr Kmoch petr.kmoch at gmail.com
Wed Aug 27 02:45:46 EDT 2014


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.raman at 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,9930100026 Extn: 2144 Voip No. 4088344495/96/97/98
> Voip Extn:1178| Fax: +91 22 30511111
>
> ravi.raman at xoriant.com <ram.singh at xoriant.com>| http://www.xoriant.com
>
>
>
> --
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140827/fca45af1/attachment.html>


More information about the CMake mailing list