-fvisibility=hidden fixes on osx with -flto

This commit is contained in:
Dane Springmeyer 2014-08-09 13:40:05 -07:00
parent 1c9afc9a86
commit d61efc0b5a
6 changed files with 20 additions and 15 deletions

View file

@ -333,8 +333,8 @@ operator>>(std::istream & is, mapnik::enumeration<ENUM, THE_MAX> & e)
*/ */
#define IMPLEMENT_ENUM( name, strings ) \ #define IMPLEMENT_ENUM( name, strings ) \
template <> const char ** name ::our_strings_ = strings; \ template <> MAPNIK_DECL const char ** name ::our_strings_ = strings; \
template <> std::string name ::our_name_ = #name; \ template <> MAPNIK_DECL std::string name ::our_name_ = #name; \
template <> bool name ::our_verified_flag_( name ::verify_mapnik_enum(__FILE__, __LINE__)); template <> MAPNIK_DECL bool name ::our_verified_flag_( name ::verify_mapnik_enum(__FILE__, __LINE__));
#endif // MAPNIK_ENUMERATION_HPP #endif // MAPNIK_ENUMERATION_HPP

View file

@ -36,7 +36,7 @@ namespace mapnik
* be rendered atomically when the filter attached to * be rendered atomically when the filter attached to
* this rule is matched. * this rule is matched.
*/ */
struct group_rule struct MAPNIK_DECL group_rule
{ {
using symbolizers = std::vector<symbolizer>; using symbolizers = std::vector<symbolizer>;

View file

@ -25,6 +25,7 @@
// mapnik // mapnik
#include <mapnik/global.hpp> #include <mapnik/global.hpp>
#include <mapnik/config.hpp>
// stl // stl
#include <cassert> #include <cassert>
@ -34,7 +35,7 @@
namespace mapnik namespace mapnik
{ {
template <typename T> template <typename T>
class ImageData class MAPNIK_DECL ImageData
{ {
public: public:
using pixel_type = T; using pixel_type = T;

View file

@ -90,7 +90,7 @@ using dash_array = std::vector<std::pair<double,double> >;
class text_placements; class text_placements;
using text_placements_ptr = std::shared_ptr<text_placements>; using text_placements_ptr = std::shared_ptr<text_placements>;
struct MAPNIK_DECL symbolizer_base struct MAPNIK_DECL symbolizer_base
{ {
using value_type = boost::variant<value_bool, using value_type = boost::variant<value_bool,
value_integer, value_integer,
@ -453,20 +453,20 @@ struct extract_raw_value : public boost::static_visitor<T1>
}; };
template <typename T> template <typename T>
void put(symbolizer_base & sym, keys key, T const& val) MAPNIK_DECL void put(symbolizer_base & sym, keys key, T const& val)
{ {
constexpr bool enum_ = std::is_enum<T>::value; constexpr bool enum_ = std::is_enum<T>::value;
detail::put_impl<T, enum_ >::apply(sym, key, val); detail::put_impl<T, enum_ >::apply(sym, key, val);
} }
template <typename T> template <typename T>
bool has_key(symbolizer_base const& sym, keys key) MAPNIK_DECL bool has_key(symbolizer_base const& sym, keys key)
{ {
return (sym.properties.count(key) == 1); return (sym.properties.count(key) == 1);
} }
template <typename T> template <typename T>
T get(symbolizer_base const& sym, keys key, mapnik::feature_impl const& feature, attributes const& vars, T const& _default_value = T()) MAPNIK_DECL T get(symbolizer_base const& sym, keys key, mapnik::feature_impl const& feature, attributes const& vars, T const& _default_value = T())
{ {
using const_iterator = symbolizer_base::cont_type::const_iterator; using const_iterator = symbolizer_base::cont_type::const_iterator;
const_iterator itr = sym.properties.find(key); const_iterator itr = sym.properties.find(key);
@ -478,7 +478,7 @@ T get(symbolizer_base const& sym, keys key, mapnik::feature_impl const& feature,
} }
template <typename T> template <typename T>
boost::optional<T> get_optional(symbolizer_base const& sym, keys key, mapnik::feature_impl const& feature, attributes const& vars) MAPNIK_DECL boost::optional<T> get_optional(symbolizer_base const& sym, keys key, mapnik::feature_impl const& feature, attributes const& vars)
{ {
using const_iterator = symbolizer_base::cont_type::const_iterator; using const_iterator = symbolizer_base::cont_type::const_iterator;
const_iterator itr = sym.properties.find(key); const_iterator itr = sym.properties.find(key);
@ -490,7 +490,7 @@ boost::optional<T> get_optional(symbolizer_base const& sym, keys key, mapnik::fe
} }
template <typename T> template <typename T>
T get(symbolizer_base const& sym, keys key, T const& _default_value = T()) MAPNIK_DECL T get(symbolizer_base const& sym, keys key, T const& _default_value = T())
{ {
using const_iterator = symbolizer_base::cont_type::const_iterator; using const_iterator = symbolizer_base::cont_type::const_iterator;
const_iterator itr = sym.properties.find(key); const_iterator itr = sym.properties.find(key);
@ -502,7 +502,7 @@ T get(symbolizer_base const& sym, keys key, T const& _default_value = T())
} }
template <typename T> template <typename T>
boost::optional<T> get_optional(symbolizer_base const& sym, keys key) MAPNIK_DECL boost::optional<T> get_optional(symbolizer_base const& sym, keys key)
{ {
using const_iterator = symbolizer_base::cont_type::const_iterator; using const_iterator = symbolizer_base::cont_type::const_iterator;
const_iterator itr = sym.properties.find(key); const_iterator itr = sym.properties.find(key);
@ -520,8 +520,8 @@ constexpr auto to_integral(Enum e) -> typename std::underlying_type<Enum>::type
} }
using property_meta_type = std::tuple<const char*, mapnik::symbolizer_base::value_type, std::function<std::string(enumeration_wrapper)>, property_types>; using property_meta_type = std::tuple<const char*, mapnik::symbolizer_base::value_type, std::function<std::string(enumeration_wrapper)>, property_types>;
property_meta_type const& get_meta(mapnik::keys key); MAPNIK_DECL property_meta_type const& get_meta(mapnik::keys key);
mapnik::keys get_key(std::string const& name); MAPNIK_DECL mapnik::keys get_key(std::string const& name);
// concrete symbolizer types // concrete symbolizer types
struct MAPNIK_DECL point_symbolizer : public symbolizer_base {}; struct MAPNIK_DECL point_symbolizer : public symbolizer_base {};

View file

@ -23,6 +23,9 @@
#ifndef MAPNIK_VALUE_TYPES_HPP #ifndef MAPNIK_VALUE_TYPES_HPP
#define MAPNIK_VALUE_TYPES_HPP #define MAPNIK_VALUE_TYPES_HPP
// mapnik
#include <mapnik/config.hpp>
// icu // icu
#include <unicode/unistr.h> // for UnicodeString #include <unicode/unistr.h> // for UnicodeString
@ -42,7 +45,7 @@ using value_double = double;
using value_unicode_string = U_NAMESPACE_QUALIFIER UnicodeString; using value_unicode_string = U_NAMESPACE_QUALIFIER UnicodeString;
using value_bool = bool; using value_bool = bool;
struct value_null struct MAPNIK_DECL value_null
{ {
bool operator==(value_null const&) const bool operator==(value_null const&) const
{ {

View file

@ -29,6 +29,7 @@
#include <mapnik/geom_util.hpp> #include <mapnik/geom_util.hpp>
#include <mapnik/timer.hpp> #include <mapnik/timer.hpp>
#include <mapnik/value_types.hpp> #include <mapnik/value_types.hpp>
#include <mapnik/boolean.hpp>
#include <gdal_version.h> #include <gdal_version.h>