IAR-ASM.cmake 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # This file is processed when the IAR compiler is used for an assembler file
  2. include(Compiler/IAR)
  3. if("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM")
  4. set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
  5. __compiler_iar_ilink(ASM)
  6. set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)
  7. elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RX")
  8. set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
  9. __compiler_iar_ilink(ASM)
  10. set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)
  11. elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RH850")
  12. set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
  13. __compiler_iar_ilink(ASM)
  14. set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)
  15. elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RL78")
  16. set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
  17. __compiler_iar_ilink(ASM)
  18. set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)
  19. elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RISC-V")
  20. set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
  21. __compiler_iar_ilink(ASM)
  22. set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)
  23. elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
  24. set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
  25. __compiler_iar_xlink(ASM)
  26. set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s90;asm;msa)
  27. elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
  28. set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
  29. __compiler_iar_xlink(ASM)
  30. set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s43;asm;msa)
  31. elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850")
  32. set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
  33. __compiler_iar_xlink(ASM)
  34. set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s85;asm;msa)
  35. elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051")
  36. set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
  37. __compiler_iar_xlink(ASM)
  38. set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s51;asm;msa)
  39. else()
  40. message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID not detected. This should be automatic.")
  41. endif()