Reputation: 29
I want to know if I can define C language macro in Android.bp file ? I am wrapping unit tests of some modules (which are written in C++) into VTS framework. There are certain changes which needs to be protected under macro.
Upvotes: 0
Views: 1134
Reputation: 2036
You could add a define to the cflags
in your Android.bp
to be checked in your test code.
cc_binary {
[...]
cflags: [ "-DMYUNITTEST" ]
}
#ifndef MYUNITTEST
// not to be used in this unittest.
#endif
Upvotes: 0