fix bug to compile system file with release flag even in debug mode

- create a helper to set add compile flag to files (compile_flag_header.cmake)
- remove useless file stream
- it is possible to debug hal file by passing -DDEBUG_HAL to the cmake command line