N
N
nick0x012012-10-12 19:32:46
Programming
nick0x01, 2012-10-12 19:32:46

Inheritance of pro-processor definitions of the main project by subprojects

There is a project containing several subprojects (libraries), one of the subprojects has two build options (depending on preprocessor defines). Is it possible to set up preprocessor definitions only in the main project, so that they are inherited by libraries as well?
For what? Either are organized as subrepositories, and such settings are needed so that the settings of one project do not affect others.
Can this be done in Visual Studio and Xcode? And then I didn’t come up with anything smarter than creating different targets with different settings for libraries.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mejedi, 2012-10-12
@nick0x01

For XCode there are xcconfig files (the definition of project settings in a text file, include between files is supported) There is an analog for the studio.
For xcode, you can also try BUILD_VARIANTS - usually normal, profile, debug, or a combination of them is used, but you can add your own configuration names. All "options" will be collected, you set the settings in the OTHER_CFLAGS_ variables.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question