CMake/Assembler: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
Line 9: Line 9:


==Supported Assembler Dialects==
==Supported Assembler Dialects==
===Generic ASM===
===Generic ASM===
This serves as base for the different assembler dialects.
* Supported assembler names: defaults to as, gas, may have toolchain specific prefix, can be overriden by setting CMAKE_ASM_COMPILER before enabling the ASM language
* Supported source files extensions: defaults to .s, .S, .asm, can be overriden by setting CMAKE_ASM_SOURCE_FILE_EXTENSIONS before enabling the ASM language
* Involved files: CMakeASMInformation.cmake, CMakeDetermineASMCompiler.cmake, CMakeTestASMCompiler.cmake


===ASM-ATT===
===ASM-ATT===
Line 20: Line 26:
===ASM_MASM===
===ASM_MASM===


This can be used for assembler files in AT&T assembler syntax. This includes the GNU assembler gas.
This is support for the Microsoft assembler.
* Supported assembler names: ml.exe, ml64.exe
 
* Supported assembler names: ml, ml64
* Supported source files extensions: .asm  
* Supported source files extensions: .asm  
* Involved files: CMakeASM_MASMInformation.cmake, CMakeDetermineASM_MASMCompiler.cmake, CMakeTestASM_MASMCompiler.cmake
* Involved files: CMakeASM_MASMInformation.cmake, CMakeDetermineASM_MASMCompiler.cmake, CMakeTestASM_MASMCompiler.cmake


==How to add support for other assembler "dialects"==
==How to add support for other assembler "dialects"==

Revision as of 14:27, 11 January 2009

Introduction

Since version 2.6.0 CMake has basic support for using assembler source files in CMake projects. Assembler is different from other languages in that it actually is no single language, but there are many different assembler languages. CMake supports a generic "ASM" language and specialized "ASM_XXX" languages for assembler "dialects".

Currently supported:

  • ASM-ATT (since 2.6.0)
  • ASM_MASM (since 2.6.3)

Supported Assembler Dialects

Generic ASM

This serves as base for the different assembler dialects.

  • Supported assembler names: defaults to as, gas, may have toolchain specific prefix, can be overriden by setting CMAKE_ASM_COMPILER before enabling the ASM language
  • Supported source files extensions: defaults to .s, .S, .asm, can be overriden by setting CMAKE_ASM_SOURCE_FILE_EXTENSIONS before enabling the ASM language
  • Involved files: CMakeASMInformation.cmake, CMakeDetermineASMCompiler.cmake, CMakeTestASMCompiler.cmake

ASM-ATT

This can be used for assembler files in AT&T assembler syntax. This includes the GNU assembler gas.

  • Supported assembler names: as, gas, may have toolchain specific prefix
  • Supported source files extensions: .s, .S, .asm
  • Involved files: CMakeASM-ATTInformation.cmake, CMakeDetermineASM-ATTCompiler.cmake, CMakeTestASM-ATTCompiler.cmake

ASM_MASM

This is support for the Microsoft assembler.

  • Supported assembler names: ml, ml64
  • Supported source files extensions: .asm
  • Involved files: CMakeASM_MASMInformation.cmake, CMakeDetermineASM_MASMCompiler.cmake, CMakeTestASM_MASMCompiler.cmake

How to add support for other assembler "dialects"