[CMake] nasm and TRY_COMPILE problem

Prakash Punnoor prakash at punnoor.de
Thu Mar 2 16:30:11 EST 2006


[I think the cc to the list got lost]

Am Donnerstag März 2 2006 20:39 schrieb William A. Hoffman:
> I found the problem with your example and checked in a fix into CVS.
> The try_compile command was not sending the value of CMAKE_MOUDLE_PATH
> into the try compile project.

Thanks! It works now. Is there a way to check for the CMake Version pasing the 
CMakeLists.txt file? I implemented a work-around for 2.2, as I don't want to 
rely on the user fetching a cvs cmake.

> IF(NOT CMAKE_ASM_LINK_EXECUTABLE)
>   IF(UNIX)
>     SET(CMAKE_ASM_LINK_EXECUTABLE
>        "<CMAKE_ASM_COMPILER> -f elf <FLAGS> -o <TARGET> <OBJECTS>")
>   ELSE(UNIX)
>     SET(CMAKE_ASM_LINK_EXECUTABLE
>        "<CMAKE_ASM_COMPILER> -f win32 -DWIN32 <FLAGS> -o <TARGET> <OBJECTS>
> ") ENDIF(UNIX)
> ENDIF(NOT CMAKE_ASM_LINK_EXECUTABLE)

No this won't work, as nasm is only a compiler and not a linker. The the test 
will alwas return fals. I just set SET(CMAKE_ASM_LINK_EXECUTABLE "") and this 
does the trick. Is there a way to tell CMake that nasm cannot link?

Could a proper setting for

SET(CMAKE_ASM_LINKER_PREFERENCE None)

help?

Cheers,
-- 
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060302/c212d5be/attachment.pgp


More information about the CMake mailing list