sorenfriis opened a new pull request, #17427:
URL: https://github.com/apache/nuttx/pull/17427

   - Enable ccache in CMake if CONFIG_CCACHE is set
   
   ## Summary
   
   Enable ccache support when building with CMake.
   Currently the CONFIG_CCACHE setting is not used when building with CMake.
   
   ## Impact
   
   If CONFIG_CCACHE is set and ccache is installed, ccache will be used as 
compiler wrapper, which will speed up incremental and clean builds.
   If CONFIG_CCACHE is set and ccache is **not** found, CMake will fail since 
the REQUIRED keyword is used.
   
   
   ## Testing
   Configure
   ```
   > mkdir build && cd build
   > cmake .. -DBOARD_CONFIG=sim:nsh -GNinja
   > ninja menuconfig    # <<<  Enable CONFIG_CCACHE
   ``` 
   
   Build with empty ccache
   ``` 
   > ccache -C -z
   > ninja clean
   > ninja
   > ccache -s
   Cacheable calls:    1171 / 1173 (99.83%)
     Hits:                0 / 1171 ( 0.00%)
       Direct:            0
       Preprocessed:      0
     Misses:           1171 / 1171 (100.0%)
   Uncacheable calls:     2 / 1173 ( 0.17%)
   Local storage:
     Cache size (GiB):  0.0 /  5.0 ( 0.26%)
     Hits:                0 / 1171 ( 0.00%)
     Misses:           1171 / 1171 (100.0%)
   ```
   
   Build with populated ccache
   ```
   > ccache -z
   > ninja clean
   > ninja
   > ccache -s
   Cacheable calls:    1171 / 1173 (99.83%)
     Hits:             1170 / 1171 (99.91%)
       Direct:         1170 / 1170 (100.0%)
       Preprocessed:      0 / 1170 ( 0.00%)
     Misses:              1 / 1171 ( 0.09%)
   Uncacheable calls:     2 / 1173 ( 0.17%)
   Local storage:
     Cache size (GiB):  0.0 /  5.0 ( 0.26%)
     Hits:             1170 / 1171 (99.91%)
     Misses:              1 / 1171 ( 0.09%)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to