How to exclude build target when compiling properly?

For example, I don’t want paper2d, VR related things and some other to be compiled. What one supposed to do to achieve this? Looked through the docs and found nothing there. Thanks.

#if UE_BUILD_TEST
#if UE_BUILD_DEVELOPMENT
#if UE_BUILD_DEBUG
#if UE_BUILD_DEBUGGAME

and a few others, might be what your looking for. Will exclude non-essential things. Do you mean compiling C++ classes, packaging, cooking?

Hope this helps
Don’t forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going.

Actually I need just to configure UBT to work in a way I want. What I’m looking for is something like do-not-compile variable somewhere in build tool so things I want to skip wont be compiled but source code will remain untouched.