This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM: How to get project name for preprocessor

Hi all,

I'm wonder is possible to get project name for preprocessor commands as define (ie. #ifdef...)
like compilation date/time by using "__DATE__" & "__TIME__".

Greetings,
Lukasz.

Parents
  • That will work only by you passing the project name to the preprocessor yourself. I.e. you will have to add something like

    -D PROJECT_NAME=something
    


    to the compiler options in project setup. You may want to to supply a default definition before you use this, e.g. in the source, do:

    #ifndef PROJECT_NAME
    #define PROJECT_NAME unknown
    #endif
    

Reply
  • That will work only by you passing the project name to the preprocessor yourself. I.e. you will have to add something like

    -D PROJECT_NAME=something
    


    to the compiler options in project setup. You may want to to supply a default definition before you use this, e.g. in the source, do:

    #ifndef PROJECT_NAME
    #define PROJECT_NAME unknown
    #endif
    

Children