Changed logic for cuda support build