get back to previous version with all cmake option define in a dedicated
function for aggregator