Fix cmake cache variable for modules