Skip to content

Commit dc288a4

Browse files
authored
Add compile time warning for C++14 upgrade (#1219)
* Add compile time warning for C++14 upgrade * Rename cpp warning file and change #warning to #message to avoid "warning as error" * Add release note
1 parent d7ff369 commit dc288a4

File tree

19 files changed

+43
-0
lines changed

19 files changed

+43
-0
lines changed

admob/src/include/firebase/admob.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "firebase/admob/rewarded_video.h"
2929
#include "firebase/admob/types.h"
3030
#include "firebase/app.h"
31+
#include "firebase/cpp_version_warning.h"
3132
#include "firebase/internal/common.h"
3233

3334
#if !defined(DOXYGEN) && !defined(SWIG)

analytics/src/include/firebase/analytics.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <string>
2424

2525
#include "firebase/app.h"
26+
#include "firebase/cpp_version_warning.h"
2627
#include "firebase/future.h"
2728
#include "firebase/internal/common.h"
2829
#include "firebase/variant.h"

app/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ endif()
251251

252252
set(internal_HDRS
253253
src/include/firebase/app.h
254+
src/include/firebase/cpp_version_warning.h
254255
src/include/firebase/future.h
255256
src/include/firebase/internal/common.h
256257
src/include/firebase/internal/future_impl.h

app/src/include/firebase/app.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#ifndef FIREBASE_APP_SRC_INCLUDE_FIREBASE_APP_H_
1818
#define FIREBASE_APP_SRC_INCLUDE_FIREBASE_APP_H_
1919

20+
#include "cpp_version_warning.h"
2021
#include "firebase/internal/platform.h"
2122

2223
#if FIREBASE_PLATFORM_ANDROID
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2023 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#if __cplusplus < 201400
18+
#pragma message \
19+
"The next major release of the Firebase C++ SDK will " \
20+
"drop support for C++11, setting the new minimum C++ version to C++14."
21+
#endif

app_check/src/include/firebase/app_check.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <string>
1919

2020
#include "firebase/app.h"
21+
#include "firebase/cpp_version_warning.h"
2122
#include "firebase/future.h"
2223

2324
namespace firebase {

auth/src/include/firebase/auth.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "firebase/app.h"
2323
#include "firebase/auth/user.h"
24+
#include "firebase/cpp_version_warning.h"
2425
#include "firebase/future.h"
2526
#include "firebase/internal/common.h"
2627

database/src/include/firebase/database.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define FIREBASE_DATABASE_SRC_INCLUDE_FIREBASE_DATABASE_H_
1717

1818
#include "firebase/app.h"
19+
#include "firebase/cpp_version_warning.h"
1920
#include "firebase/database/common.h"
2021
#include "firebase/database/data_snapshot.h"
2122
#include "firebase/database/database_reference.h"

dynamic_links/src/include/firebase/dynamic_links.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <string>
1919

2020
#include "firebase/app.h"
21+
#include "firebase/cpp_version_warning.h"
2122
#include "firebase/internal/common.h"
2223

2324
#if !defined(DOXYGEN) && !defined(SWIG)

firestore/src/include/firebase/firestore.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "firebase/internal/common.h"
2424

2525
#include "firebase/app.h"
26+
#include "firebase/cpp_version_warning.h"
2627
#include "firebase/future.h"
2728
#include "firebase/log.h"
2829
// Include *all* the public headers to make sure including just "firestore.h" is

functions/src/include/firebase/functions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <string>
1919

2020
#include "firebase/app.h"
21+
#include "firebase/cpp_version_warning.h"
2122
#include "firebase/functions/callable_reference.h"
2223
#include "firebase/functions/callable_result.h"
2324
#include "firebase/functions/common.h"

gma/src/include/firebase/gma.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <vector>
2727

2828
#include "firebase/app.h"
29+
#include "firebase/cpp_version_warning.h"
2930
#include "firebase/gma/ad_view.h"
3031
#include "firebase/gma/interstitial_ad.h"
3132
#include "firebase/gma/rewarded_ad.h"

installations/src/include/firebase/installations.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <string>
2020

2121
#include "firebase/app.h"
22+
#include "firebase/cpp_version_warning.h"
2223
#include "firebase/future.h"
2324
#include "firebase/internal/common.h"
2425

messaging/src/include/firebase/messaging.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <vector>
2323

2424
#include "firebase/app.h"
25+
#include "firebase/cpp_version_warning.h"
2526
#include "firebase/future.h"
2627
#include "firebase/internal/common.h"
2728

performance/src/include/firebase/performance.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#define FIREBASE_PERFORMANCE_SRC_INCLUDE_FIREBASE_PERFORMANCE_H_
55

66
#include "firebase/app.h"
7+
#include "firebase/cpp_version_warning.h"
78
#include "firebase/performance/http_metric.h"
89
#include "firebase/performance/trace.h"
910

release_build_files/readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,11 @@ workflow use only during the development of your app, not for publicly shipping
642642
code.
643643

644644
## Release Notes
645+
### Upcoming Release
646+
- Changes
647+
- General: Add build time warning for C++11, since the next major release of
648+
the Firebase C++ SDK will set the new minimum C++ version to C++14.
649+
645650
### 10.6.0
646651
- Changes
647652
- General (Android): Update to Firebase Android BoM version 31.2.3.

remote_config/src/include/firebase/remote_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <vector>
2121

2222
#include "firebase/app.h"
23+
#include "firebase/cpp_version_warning.h"
2324
#include "firebase/future.h"
2425
#include "firebase/internal/common.h"
2526
#include "firebase/internal/platform.h"

storage/src/include/firebase/storage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <string>
1919

2020
#include "firebase/app.h"
21+
#include "firebase/cpp_version_warning.h"
2122
#include "firebase/internal/common.h"
2223
#include "firebase/storage/common.h"
2324
#include "firebase/storage/controller.h"

testlab/src/include/firebase/testlab.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <string>
2121

2222
#include "firebase/app.h"
23+
#include "firebase/cpp_version_warning.h"
2324
#include "firebase/internal/common.h"
2425

2526
#if !defined(DOXYGEN) && !defined(SWIG)

0 commit comments

Comments
 (0)