2016-09-27 22:01:08 +03:00
|
|
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
2010-09-27 20:04:34 +04:00
|
|
|
|
|
|
|
|
2010-09-25 22:57:03 +04:00
|
|
|
# support for the nasm assembler
|
|
|
|
|
2010-10-21 22:51:46 +04:00
|
|
|
set(CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS nasm asm)
|
2010-09-25 22:57:03 +04:00
|
|
|
|
2010-11-12 22:27:18 +03:00
|
|
|
if(NOT CMAKE_ASM_NASM_OBJECT_FORMAT)
|
|
|
|
if(WIN32)
|
|
|
|
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_ASM_NASM_OBJECT_FORMAT win64)
|
2010-11-12 22:27:18 +03:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_ASM_NASM_OBJECT_FORMAT win32)
|
2010-11-12 22:27:18 +03:00
|
|
|
endif()
|
|
|
|
elseif(APPLE)
|
|
|
|
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_ASM_NASM_OBJECT_FORMAT macho64)
|
2010-11-12 22:27:18 +03:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_ASM_NASM_OBJECT_FORMAT macho)
|
2010-11-12 22:27:18 +03:00
|
|
|
endif()
|
2010-09-25 22:57:03 +04:00
|
|
|
else()
|
2010-11-12 22:27:18 +03:00
|
|
|
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
|
2010-11-12 22:27:18 +03:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_ASM_NASM_OBJECT_FORMAT elf)
|
2010-11-12 22:27:18 +03:00
|
|
|
endif()
|
2010-09-25 22:57:03 +04:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2016-03-26 01:18:07 +03:00
|
|
|
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <INCLUDES> <FLAGS> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
|
2010-09-25 22:57:03 +04:00
|
|
|
|
|
|
|
# Load the generic ASMInformation file:
|
|
|
|
set(ASM_DIALECT "_NASM")
|
|
|
|
include(CMakeASMInformation)
|
|
|
|
set(ASM_DIALECT)
|