Merge branch 'release-4-5-patches'
[gromacs/adressmacs.git] / cmake / CMakeASM-NASMInformation.cmake
blob710b99a061d340df9be7b6df2be7770fe7ae1692
1 # support for the nasm assembler
3 SET(ASM_DIALECT "-NASM")
5 SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s)
7 if(WIN32)
8   if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
9     SET(CMAKE_ASM${ASM_DIALECT}_OBJECT_FORMAT win64)
10   else()
11     SET(CMAKE_ASM${ASM_DIALECT}_OBJECT_FORMAT win32)
12   endif()
13 elseif(APPLE)
14   if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
15     SET(CMAKE_ASM${ASM_DIALECT}_OBJECT_FORMAT macho64)
16   else()
17     SET(CMAKE_ASM${ASM_DIALECT}_OBJECT_FORMAT macho)
18   endif()
19 else()
20   if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
21     SET(CMAKE_ASM${ASM_DIALECT}_OBJECT_FORMAT elf64)
22   else()
23     SET(CMAKE_ASM${ASM_DIALECT}_OBJECT_FORMAT elf)
24   endif()
25 endif()
27 SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -f ${CMAKE_ASM${ASM_DIALECT}_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
29 INCLUDE(CMakeASMInformation)
30 SET(ASM_DIALECT)