mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-03 11:15:24 +08:00
Make weak symbol usage more portable:
- Enable support for Green Hills Software compiler - Define weak implementations only once except on Windows
This commit is contained in:
@ -158,7 +158,9 @@ class UnityTestRunnerGenerator
|
||||
create_runtest(output, mocks)
|
||||
output.puts("\n/*=======Automagically Detected Files To Include=====*/")
|
||||
output.puts("#include \"#{@options[:framework]}.h\"")
|
||||
output.puts('#ifdef __WIN32__')
|
||||
output.puts("#include \"#{@options[:framework]}_setup.h\"")
|
||||
output.puts('#endif')
|
||||
output.puts('#include "cmock.h"') unless mocks.empty?
|
||||
output.puts('#include <setjmp.h>')
|
||||
output.puts('#include <stdio.h>')
|
||||
|
@ -301,7 +301,7 @@ extern void UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION;
|
||||
* Language Features Available
|
||||
*-------------------------------------------------------*/
|
||||
#if !defined(UNITY_WEAK_ATTRIBUTE) && !defined(UNITY_WEAK_PRAGMA)
|
||||
# ifdef __GNUC__ /* includes clang */
|
||||
# if defined(__GNUC__) || defined(__ghs__) /* __GNUC__ includes clang */
|
||||
# if !(defined(__WIN32__) && defined(__clang__)) && !defined(__TMS470__)
|
||||
# define UNITY_WEAK_ATTRIBUTE __attribute__((weak))
|
||||
# endif
|
||||
|
Reference in New Issue
Block a user