From 0186cbb7b7ab233de81ddaaa8276bc53e7d97177 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 2 Oct 2013 20:35:38 +0200 Subject: [PATCH] cmake: prevent Boost barfing out too many warns --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bbee824..440f147e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.6.4) include (CheckFunctionExists) include (CheckIncludeFile) include (CheckCXXSourceCompiles) - +include (CheckCXXCompilerFlag) project(SimGear) @@ -314,6 +314,14 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(WARNING_FLAGS_C "-Wall") endif() +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +# boost goes haywire wrt static asserts + check_cxx_compiler_flag(-Wno-unused-local-typedefs HAS_NOWARN_UNUSED_TYPEDEFS) + if(HAS_NOWARN_UNUSED_TYPEDEFS) + set(WARNING_FLAGS_CXX " ${WARNING_FLAGS_CXX} -Wno-unused-local-typedefs") + endif() +endif() + if(WIN32) if(MINGW) -- 2.39.5