From 474d478854ef2ec46bf7b0cb6148c91b7fb8cc2c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 11 Sep 2019 15:55:37 -0700 Subject: Only pass -Wold-style-cast for C++ --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c37a2d18..4effb94a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -220,7 +220,7 @@ IF(MSVC) ENDFOREACH(flag_var) ENDIF() ELSE() - SET(C_FLAGS ${C_FLAGS} -Winline -Wall -Wold-style-cast) + SET(C_FLAGS ${C_FLAGS} -Winline -Wall $<$:-Wold-style-cast>) CHECK_C_COMPILER_FLAG(-Wextra HAVE_W_EXTRA) IF(HAVE_W_EXTRA) SET(C_FLAGS ${C_FLAGS} -Wextra) -- cgit v1.2.3