From 1f3551820b01a1c69fc409b1b3a10d40c25fae81 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 3 Feb 2009 11:05:35 +0000 Subject: [PATCH] Added disabling of "warning: format not a string literal, argument types not checked" under FreeBSD as these errors are being generated from std library ostream implementation. --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01bba8964..d06d0b7b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -548,6 +548,15 @@ IF(CMAKE_COMPILER_IS_GNUCXX) # semicolons and commas, and the use of long long. -fpermissive seems # to be the workaround. SET(OSG_AGGRESSIVE_WARNING_FLAGS -Wall -Wparentheses -Wformat=2 -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -fpermissive) + + IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") + + # disable the "warning: format not a string literal and no format arguments" emited from std library ostream support + SET(OSG_AGGRESSIVE_WARNING_FLAGS ${OSG_AGGRESSIVE_WARNING_FLAGS} -Wformat=0) + + ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") + + ELSE(CMAKE_COMPILER_IS_GNUCXX) IF(MSVC) # FIXME: What are good aggressive warning flags for Visual Studio?