diff options
author | Nico Mueller <nicomueller1991@googlemail.com> | 2019-09-16 08:45:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-16 15:07:04 (GMT) |
commit | bd5006e8134a3ea5d949f9eedf139126af357820 (patch) | |
tree | 4e2f069c2df2f4c7c9d15fb4e4e05ac39312c2c7 /Modules | |
parent | bfa2eaa617de778ecfb2a0678c9898605822260d (diff) | |
download | CMake-bd5006e8134a3ea5d949f9eedf139126af357820.zip CMake-bd5006e8134a3ea5d949f9eedf139126af357820.tar.gz CMake-bd5006e8134a3ea5d949f9eedf139126af357820.tar.bz2 |
IAR: Add v850 support
Add compiler identification for V850.
Issue: #17264
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakePlatformId.h.in | 3 | ||||
-rw-r--r-- | Modules/Compiler/IAR-C.cmake | 5 | ||||
-rw-r--r-- | Modules/Compiler/IAR-CXX.cmake | 4 | ||||
-rw-r--r-- | Modules/Compiler/IAR-DetermineCompiler.cmake | 2 | ||||
-rw-r--r-- | Modules/Compiler/IAR-FindBinUtils.cmake | 3 |
5 files changed, 15 insertions, 2 deletions
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in index 542a6fe..95465ce 100644 --- a/Modules/CMakePlatformId.h.in +++ b/Modules/CMakePlatformId.h.in @@ -174,6 +174,9 @@ # elif defined(__ICC430__) # define ARCHITECTURE_ID "MSP430" +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + # else /* unknown architecture */ # define ARCHITECTURE_ID "" # endif diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake index e03ce3f..9ad1ba0 100644 --- a/Modules/Compiler/IAR-C.cmake +++ b/Modules/Compiler/IAR-C.cmake @@ -60,6 +60,11 @@ elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430") __compiler_check_default_language_standard(C 1.10 90 5.10 99) set(CMAKE_C_OUTPUT_EXTENSION ".r43") +elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") + __compiler_iar_xlink(C) + __compiler_check_default_language_standard(C 1.10 90 4.10 99) + set(CMAKE_C_OUTPUT_EXTENSION ".r85") + else() message(FATAL_ERROR "CMAKE_C_COMPILER_ARCHITECTURE_ID not detected. This should be automatic.") endif() diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake index e8f1142..549d242 100644 --- a/Modules/Compiler/IAR-CXX.cmake +++ b/Modules/Compiler/IAR-CXX.cmake @@ -68,6 +68,10 @@ elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430") __compiler_check_default_language_standard(CXX 5.10 98) set(CMAKE_CXX_OUTPUT_EXTENSION ".r43") +elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") + __compiler_iar_xlink(CXX) + __compiler_check_default_language_standard(CXX 1.10 98) + set(CMAKE_C_OUTPUT_EXTENSION ".r85") else() message(FATAL_ERROR "CMAKE_CXX_COMPILER_ARCHITECTURE_ID not detected. This should be automatic." ) endif() diff --git a/Modules/Compiler/IAR-DetermineCompiler.cmake b/Modules/Compiler/IAR-DetermineCompiler.cmake index 57ca1c9..7e17778 100644 --- a/Modules/Compiler/IAR-DetermineCompiler.cmake +++ b/Modules/Compiler/IAR-DetermineCompiler.cmake @@ -31,7 +31,7 @@ set(_compiler_id_version_compute " # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(((__VER__) / 1000) % 1000) # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@((__VER__) % 1000) # define @PREFIX@COMPILER_VERSION_INTERNAL @MACRO_DEC@(__IAR_SYSTEMS_ICC__) -# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__)) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__)) # define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@((__VER__) / 100) # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@((__VER__) - (((__VER__) / 100)*100)) # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__SUBVERSION__) diff --git a/Modules/Compiler/IAR-FindBinUtils.cmake b/Modules/Compiler/IAR-FindBinUtils.cmake index b7d4664..6258cf3 100644 --- a/Modules/Compiler/IAR-FindBinUtils.cmake +++ b/Modules/Compiler/IAR-FindBinUtils.cmake @@ -45,7 +45,8 @@ set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\") ") elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR" OR - "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430") + "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430" OR + "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") # Find the "xlink" linker and "xar" archiver: find_program(CMAKE_IAR_LINKER xlink HINTS ${__iar_hints} |