mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 20:19:53 +00:00
SDCC: Fix identification of current sdcc compiler
The sdcc compiler no longer defines the `SDCC` preprocessor macro. Instead `__SDCC_VERSION_MAJOR` and similar component-wise macros are defined. Use them instead if defined. Issue: #16746
This commit is contained in:
parent
1adbe223cd
commit
5695558f4a
@ -1,10 +1,16 @@
|
||||
|
||||
# sdcc, the small devices C compiler for embedded systems,
|
||||
# http://sdcc.sourceforge.net */
|
||||
set(_compiler_id_pp_test "defined(SDCC)")
|
||||
set(_compiler_id_pp_test "defined(__SDCC_VERSION_MAJOR) || defined(SDCC)")
|
||||
|
||||
set(_compiler_id_version_compute "
|
||||
# if defined(__SDCC_VERSION_MAJOR)
|
||||
# define COMPILER_VERSION_MAJOR @MACRO_DEC@(__SDCC_VERSION_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR @MACRO_DEC@(__SDCC_VERSION_MINOR)
|
||||
# define COMPILER_VERSION_PATCH @MACRO_DEC@(__SDCC_VERSION_PATCH)
|
||||
# else
|
||||
/* SDCC = VRP */
|
||||
# define COMPILER_VERSION_MAJOR @MACRO_DEC@(SDCC/100)
|
||||
# define COMPILER_VERSION_MINOR @MACRO_DEC@(SDCC/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH @MACRO_DEC@(SDCC % 10)")
|
||||
# define COMPILER_VERSION_PATCH @MACRO_DEC@(SDCC % 10)
|
||||
# endif")
|
||||
|
Loading…
Reference in New Issue
Block a user