From 028757e4e03258b645b18915ac1666621c4cf4d2 Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Tue, 10 Feb 2015 17:48:30 +0000 Subject: [PATCH] fixed compile warning on Mac 10.6 and below #4313 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82c2f925..287e573f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,11 @@ if (UNIX) # warnings as errors: # we have a problem with people checking in code with warnings. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -fPIC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") + + if (NOT APPLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + endif() # For config.h, detect the libraries, functions, etc. include(CheckIncludeFiles)