summaryrefslogtreecommitdiff
path: root/Modules/Compiler/ADSP-DetermineCompiler.cmake
diff options
context:
space:
mode:
authorChris Wright <chris.wright@mqa.co.uk>2022-03-23 10:53:58 +0000
committerChris Wright <chris.wright@mqa.co.uk>2022-04-04 16:56:47 +0100
commit88b38f531adb90af752eb5af0f90eab0ee4343ae (patch)
tree3c62c55eba1d450417f682343aa4a57ae36b3e20 /Modules/Compiler/ADSP-DetermineCompiler.cmake
parent34cb46dd6e5b98e1cbf28d7d9dc69c7c12183d2a (diff)
downloadcmake-88b38f531adb90af752eb5af0f90eab0ee4343ae.tar.gz
ADSP: Support both VDSP++ and CCES for ADSP compilers
Diffstat (limited to 'Modules/Compiler/ADSP-DetermineCompiler.cmake')
-rw-r--r--Modules/Compiler/ADSP-DetermineCompiler.cmake13
1 files changed, 7 insertions, 6 deletions
diff --git a/Modules/Compiler/ADSP-DetermineCompiler.cmake b/Modules/Compiler/ADSP-DetermineCompiler.cmake
index 0340f6904f..96c88f9174 100644
--- a/Modules/Compiler/ADSP-DetermineCompiler.cmake
+++ b/Modules/Compiler/ADSP-DetermineCompiler.cmake
@@ -1,10 +1,11 @@
-set(_compiler_id_pp_test "defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)")
+set(_compiler_id_pp_test "defined(_ADI_COMPILER)")
set(_compiler_id_version_compute "
-#if defined(__VISUALDSPVERSION__)
- /* __VISUALDSPVERSION__ = 0xVVRRPP00 */
-# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_HEX@(__VISUALDSPVERSION__>>24)
-# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_HEX@(__VISUALDSPVERSION__>>16 & 0xFF)
-# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_HEX@(__VISUALDSPVERSION__>>8 & 0xFF)
+#if defined(__VERSIONNUM__)
+ /* __VERSIONNUM__ = 0xVVRRPPTT */
+# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__VERSIONNUM__ >> 24 & 0xFF)
+# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__VERSIONNUM__ >> 16 & 0xFF)
+# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__VERSIONNUM__ >> 8 & 0xFF)
+# define @PREFIX@COMPILER_VERSION_TWEAK @MACRO_DEC@(__VERSIONNUM__ & 0xFF)
#endif")