Skip to content
Snippets Groups Projects
Select Git revision
  • 2b729ce7e8d678fabce7f0fb95dce724221963e4
  • master default
2 results

json_walker.py

Blame
  • generateCompileTimeOptions.sh 387 B
    #!/bin/bash
    
    cat <<EOF
    #ifndef __COMPILE_TIME_OPTIONS_H__
    #define __COMPILE_TIME_OPTIONS_H__
    EOF
    
    tail -n +2 compileTimeOptions.h |
    sed -re 's/BOOL_OPTION\((.*), *(.*)\)/#ifndef \1\
    #define \1 \2\
    #endif\
    #if \1\
    #pragma message "\1 ON"\
    #else\
    #pragma message "\1 off"\
    #endif\
    /;
    s/REQUIRES\((.*), (.*)\)/#if (\1) \&\& !(\2)\
    #error "\1 requires \2"\
    #endif\
    /'
    
    cat <<EOF
    #endif
    EOF