[CMake] nasm and cmake
Prakash Punnoor
lists at punnoor.de
Thu Nov 17 14:05:22 EST 2005
OK,
I got it running. It's not nice, but works for me:
CMakeASMCompiler.cmake.in:
SET(CMAKE_ASM_COMPILER "@CMAKE_ASM_COMPILER@")
SET(CMAKE_ASM_COMPILER_LOADED 1)
SET(CMAKE_ASM_COMPILER_ENV_VAR "ASM")
SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS nasm;asm;nas)
SET(CMAKE_ASM_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_ASM_LINKER_PREFERENCE None)
IF(UNIX)
SET(CMAKE_ASM_OUTPUT_EXTENSION .o)
ELSE(UNIX)
SET(CMAKE_ASM_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
CMakeASMInformation.cmake:
IF(NOT CMAKE_ASM_COMPILE_OBJECT)
IF(UNIX)
SET(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f elf <FLAGS> -o
<OBJECT> <SOURCE>")
ELSE(UNIX)
SET(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f win32 -DWIN32
<FLAGS> -o <OBJECT> <SOURCE>")
ENDIF(UNIX)
ENDIF(NOT CMAKE_ASM_COMPILE_OBJECT)
CMakeDetermineASMCompiler.cmake
IF(NOT CMAKE_ASM_COMPILER)
FIND_PROGRAM(CMAKE_ASM_COMPILER NAMES nasm )
ENDIF(NOT CMAKE_ASM_COMPILER)
MARK_AS_ADVANCED(CMAKE_ASM_COMPILER)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/CMakeASMCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeASMCompiler.cmake
IMMEDIATE)
SET(CMAKE_ASM_COMPILER_ENV_VAR "ASM")
So if anybody wants to take this as a starting point and add real
nasm/yasm support for CMake, I wouldn't mind. ;-)
Anyway, thanks to everybody for helping me to get this running!
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/20051117/84cadbc6/signature.pgp
More information about the CMake
mailing list