diff options
author | Brad King <brad.king@kitware.com> | 2012-08-22 15:48:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-22 15:48:07 (GMT) |
commit | e9bc502fb82d7e48e12d9a2bd380c137f6cbc03d (patch) | |
tree | d0f9c311fdca11b1750f204aee26b73d472cfb20 /Modules/CMakeCCompilerId.c.in | |
parent | cca386b0a058c050a03c10bf1b9f1344aef7de3f (diff) | |
download | CMake-e9bc502fb82d7e48e12d9a2bd380c137f6cbc03d.zip CMake-e9bc502fb82d7e48e12d9a2bd380c137f6cbc03d.tar.gz CMake-e9bc502fb82d7e48e12d9a2bd380c137f6cbc03d.tar.bz2 |
Detect Analog VisualDSP++ compiler version with its id
Decode hex digits from __VISUALDSPVERSION__ to compute the version
number components. Note that the constant encodes decimal digits as hex
digits (never larger than 9). We represent them as decimal after
extraction. See documentation at:
http://download.analog.com/dsp/tools/VisualDSP_45_Update_6_Release_Note_v4.pdf
http://www.analog.com/static/imported-files/software_manuals/50_asm_man.rev3.1.pdf
Note that __VISUALDSPVERSION__ was introduced in version 4.5.6.
Diffstat (limited to 'Modules/CMakeCCompilerId.c.in')
-rw-r--r-- | Modules/CMakeCCompilerId.c.in | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index f57a52a..c5bde9a 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -147,9 +147,16 @@ # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) # endif +/* Analog VisualDSP++ >= 4.5.6 */ +#elif defined(__VISUALDSPVERSION__) +# define COMPILER_ID "ADSP" + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) + +/* Analog VisualDSP++ < 4.5.6 */ #elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) -/* Analog Devices C++ compiler for Blackfin, TigerSHARC and - SHARC (21000) DSPs */ # define COMPILER_ID "ADSP" /* IAR Systems compiler for embedded systems. |