meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
programming:c:ceedling [2021/04/22 11:10] niziakprogramming:c:ceedling [2021/04/22 12:07] niziak
Line 4: Line 4:
 ===== add .c file  ===== ===== add .c file  =====
  
-When ceedling fails to pickup automatically .c file it can be added to given test by+When ''ceedling'' fails to pickup automatically .c file it can be added to given test by
 <code c> <code c>
 TEST_FILE("source_file_to_compile.c") TEST_FILE("source_file_to_compile.c")
Line 14: Line 14:
 All dependent includes needs to be added manually in test ''.c'' file. All dependent includes needs to be added manually in test ''.c'' file.
  
-To automatically add linked resources there is a project option:+This is desired behavior because ''ceedling'' gives you control how to treat additional dependeny headers.  
 +Perhaps you should break dependency chain by including mocked header. 
 + 
 +<code c> 
 +# This will include 20 another headers :) 
 + 
 +#include "cpu_hal.h" 
 + 
 +To prevent this: 
 +#include "mock_cpu_hal.h 
 +</code> 
 + 
 +===== extern keyword ===== 
 + 
 +By default ''cmock'' will ignore ''extern'' function (is not mocking them). To enable mocking of ''extern'' functions:
 <code yaml> <code yaml>
-:project+:cmock
- :auto_link_deep_dependenciesTRUE+  :treat_externs:include
 </code> </code>
  
-But it has impact on performance.+