From 9e872301027cc6339ffb87e589ac0f5f50a12eda Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Fri, 5 Apr 2013 21:04:02 +0200 Subject: [PATCH] Use -fvisibility-inlines-hidden only for C++ files. gcc emits a warning that the flag cannot be used for C. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db691881..20d3c48d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,8 @@ add_definitions(-DQT_NO_KEYWORDS -DQT_NO_EXCEPTIONS -DQT_NO_STL -DQT_STRICT_ITER add_gcc_compiler_flags("-fno-common -fstack-protector -D_FORTIFY_SOURCE=2") add_gcc_compiler_flags("-Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long") add_gcc_compiler_flags("-Wformat=2 -Wmissing-format-attribute") -add_gcc_compiler_flags("-fvisibility=hidden -fvisibility-inlines-hidden") +add_gcc_compiler_flags("-fvisibility=hidden") +add_gcc_compiler_cxxflags("-fvisibility-inlines-hidden") add_gcc_compiler_cxxflags("-fno-exceptions -fno-rtti") add_gcc_compiler_cxxflags("-Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual")