Skip to content

Commit

Permalink
Don't use push_macro and pull_macro with Tasking compiler (#643)
Browse files Browse the repository at this point in the history
* Autodetect Tasking compiler

#642

* Don't use `push_macro` and `pop_macro` for Tasking compiler

#642

Co-authored-by: Todd Snider <[email protected]>
  • Loading branch information
snideto and snideto authored Dec 14, 2022
1 parent 1bf04dc commit 22419e3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/etl/private/minmax_pop.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SOFTWARE.
* The header include guard has been intentionally omitted.
* This file is intended to evaluated multiple times by design.
*/
#if !defined(ETL_COMPILER_GREEN_HILLS) && !defined(ETL_COMPILER_IAR)
#if !defined(ETL_COMPILER_GREEN_HILLS) && !defined(ETL_COMPILER_IAR) && !defined(ETL_COMPILER_TASKING)
#if !defined(ETL_COMPILER_ARM5)
#pragma pop_macro("min")
#pragma pop_macro("max")
Expand Down
2 changes: 1 addition & 1 deletion include/etl/private/minmax_push.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SOFTWARE.
* This file is intended to evaluated multiple times by design.
*/

#if !defined(ETL_COMPILER_GREEN_HILLS) && !defined(ETL_COMPILER_IAR)
#if !defined(ETL_COMPILER_GREEN_HILLS) && !defined(ETL_COMPILER_IAR) && !defined(ETL_COMPILER_TASKING)
#if !defined(ETL_COMPILER_ARM5)
#pragma push_macro("min")
#pragma push_macro("max")
Expand Down
13 changes: 13 additions & 0 deletions include/etl/profiles/determine_compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ SOFTWARE.
#endif
#endif

#if !defined(ETL_COMPILER_TYPE_DETECTED) && !defined(ETL_COMPILER_TASKING)
#if defined(__TASKING__)
#define ETL_COMPILER_TASKING
#define ETL_COMPILER_TYPE_DETECTED
#endif
#endif

#if !defined(ETL_COMPILER_TYPE_DETECTED)
#define ETL_COMPILER_GENERIC
#endif
Expand Down Expand Up @@ -187,6 +194,12 @@ SOFTWARE.
#define ETL_USING_TEXAS_INSTRUMENTS_COMPILER 0
#endif

#if defined(ETL_COMPILER_TASKING)
#define ETL_USING_TASKING_COMPILER 1
#else
#define ETL_USING_TASKING_COMPILER 0
#endif

#if defined(ETL_COMPILER_GENERIC)
#define ETL_USING_GENERIC_COMPILER 1
#else
Expand Down
3 changes: 3 additions & 0 deletions include/etl/profiles/determine_compiler_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ SOFTWARE.
#elif defined(ETL_COMPILER_TEXAS_INSTRUMENTS)
#define ETL_COMPILER_VERSION __TI_COMPILER_VERSION__
#define ETL_COMPILER_FULL_VERSION __TI_COMPILER_VERSION__
#elif defined(ETL_COMPILER_TASKING)
#define ETL_COMPILER_VERSION __REVISION__
#define ETL_COMPILER_FULL_VERSION __VERSION__
#else
#define ETL_COMPILER_VERSION 0
#define ETL_COMPILER_FULL_VERSION 0
Expand Down

0 comments on commit 22419e3

Please sign in to comment.