From f063bcaa9b702f8f72bd17ddb00affcadd377988 Mon Sep 17 00:00:00 2001 From: Joel Low Date: Sun, 25 Jan 2015 20:47:23 +0800 Subject: [PATCH] Silence compile warnings in MSVC builds. --- ext/yajl/extconf.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/yajl/extconf.rb b/ext/yajl/extconf.rb index 2c38204b..f689e303 100644 --- a/ext/yajl/extconf.rb +++ b/ext/yajl/extconf.rb @@ -1,7 +1,11 @@ require 'mkmf' require 'rbconfig' -$CFLAGS << ' -Wall -funroll-loops' -$CFLAGS << ' -Werror-implicit-function-declaration -Wextra -O0 -ggdb3' if ENV['DEBUG'] +if RbConfig::CONFIG['host_os'] =~ /win(32|64)/ + $CFLAGS << ' /Od /Zi' if ENV['DEBUG'] +else + $CFLAGS << ' -Wall -funroll-loops' + $CFLAGS << ' -Werror-implicit-function-declaration -Wextra -O0 -ggdb3' if ENV['DEBUG'] +end create_makefile('yajl/yajl')