[CMake] nasm and cmake

Prakash Punnoor lists at punnoor.de
Wed Nov 16 17:43:21 EST 2005


Brad King schrieb:
> Prakash Punnoor wrote:
> 
>>could someone be so nice and give an example of how to get nasm files
>>compiled and linked to c objects? I searched the list and found two
> 
> This should work in CMake 2.0:

[...]

> ...but it looks like there is a bug in CMake 2.2 that prevents it from 
> working.  I'll get this fixed for the next patch release.

Aaargh, that explains it why I couldn't get it running, as I tried
something similar (but simpler).

>>Why can't cmake just have the possibility
>>to define a rule for a certain extension? As far as I understood for the
>>custom command you have to add every source file, which isn't very
>>convenient.
> 
> 
> CMake 2.2 supports custom language definitions, so you might be able to
> define an "ASM" language.  Unfortunately this support is new and not yet
> documented.  Look in the CMake/Modules directory for
> CMakeCXXInformation.cmake and similar files.  If you create your own
> CMakeASMInformation.cmake and related files and put them somewhere in
> CMAKE_MODULE_PATH then you can define your own language.  Then just do
> 
> PROJECT(my_c_and_asm_project C ASM)
> 
> and the support for the ASM language will be loaded.  Then you could 
> just include .asm sources as any other.  I have not tried doing this though.

I tried it and got following problems:

- Setting SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/") won't
help cmake finding the CMakeASMInformation.cmake. I located it there
though. So I fooled it by manually copying into CMakeFIles to get it
going anyway.

- I don't undertsand too muchof what is going on in above files, but I
managed to get may nasm files finaly compiled. Unfortunately cmake want
to call an asm linker. I rather want the c(++) linker to be called. What
must I do to get this?

Cheers,

Prakash

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20051116/4ff87728/signature.pgp


More information about the CMake mailing list