File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ include (CheckCXXCompilerFlag)
16
+
15
17
# C++ Compiler setup
16
18
17
19
# We use C++14
@@ -76,6 +78,14 @@ if(CXX_CLANG OR CXX_GNU)
76
78
list (APPEND common_flags -fdiagnostics-color)
77
79
endif ()
78
80
endif ()
81
+
82
+ # Disable treating "redundant-move" as an error since it's not really a problem,
83
+ # and is even a valid coding style to over-use std::move() in case the type is
84
+ # ever changed to become non-trivially moveable.
85
+ CHECK_CXX_COMPILER_FLAG("-Wno-error=redundant-move" FIREBASE_CXX_COMPILER_FLAG_REDUNDANT_MOVE_SUPPORTED)
86
+ if (FIREBASE_CXX_COMPILER_FLAG_REDUNDANT_MOVE_SUPPORTED)
87
+ list (APPEND common_flags -Wno-error=redundant-move)
88
+ endif ()
79
89
endif ()
80
90
81
91
if (APPLE )
You can’t perform that action at this time.
0 commit comments