[Mesa-dev] [PATCH 1/3] cmake: Don't use gcc specific warnings with g++.
Brian Paul
brianp at vmware.com
Wed Nov 19 12:44:52 PST 2014
On 11/19/2014 11:23 AM, jfonseca at vmware.com wrote:
> From: José Fonseca <jfonseca at vmware.com>
>
> Avoids "warning: command line option ‘-W...’ is valid for Ada/C/ObjC but not for
> C++".
> ---
> CMakeLists.txt | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index c3e217f..57a46f8 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -72,16 +72,13 @@ if (CMAKE_COMPILER_IS_GNUCC)
> add_definitions(
> -Wall
> -Wpointer-arith
> - -Wstrict-prototypes
> - -Wmissing-prototypes
> -Wmissing-declarations
> - -Wnested-externs
> -fno-strict-aliasing
> - -Wbad-function-cast
> #-Wold-style-definition
> #-Wdeclaration-after-statement
> )
> -endif (CMAKE_COMPILER_IS_GNUCC)
> + set (CMAKE_C_FLAGS "-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast ${CMAKE_CXX_FLAGS}")
> +endif ()
>
> if (WIN32)
> # Nobody likes to include windows.h:
>
I still haven't seen patch 2/3 come through yet, but 1&3 look ok (same
comment as Roland on 3/3).
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list