2 #=============================================================================
3 # Copyright 2010 Kitware, Inc.
5 # Distributed under the OSI-approved BSD License (the "License");
6 # see accompanying file Copyright.txt for details.
8 # This software is distributed WITHOUT ANY WARRANTY; without even the
9 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 # See the License for more information.
11 #=============================================================================
12 # (To distribute this file outside of CMake, substitute the full
13 # License text for the above reference.)
15 # support for the nasm assembler
17 set(CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS nasm asm)
19 if(NOT CMAKE_ASM_NASM_OBJECT_FORMAT)
21 if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
22 set(CMAKE_ASM_NASM_OBJECT_FORMAT win64)
24 set(CMAKE_ASM_NASM_OBJECT_FORMAT win32)
27 if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
28 set(CMAKE_ASM_NASM_OBJECT_FORMAT macho64)
30 set(CMAKE_ASM_NASM_OBJECT_FORMAT macho)
33 if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
34 set(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
36 set(CMAKE_ASM_NASM_OBJECT_FORMAT elf)
41 set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <FLAGS> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
43 # Load the generic ASMInformation file:
44 set(ASM_DIALECT "_NASM")
45 include(CMakeASMInformation)