I'm looking for a build system for a c++ project I have on gitlab. I want to create a build similar to the linux Kernel config that allows features to be turned off or on before building and I'd like all the options to be based on the feature branches that I have merged in.
Example: At time t=0, I have merged in features 1,2, and 3. At time t=1, I want to create a realease using only features 1 and 3.
All my features are separated into merge requests. My current approach would be to create a script that makes a patch and removes unselected features. Some alternatives include declaring preprocessor directives in my code for each feature.
I'd like to know if such a tool already exists or if there are general best practices I should follow.
This is what is known as a feature toggle.