Commit 0504574f authored by Dominik Charousset's avatar Dominik Charousset

Merge pull request #767

parents b91102ed 744bbbc9
...@@ -57,10 +57,9 @@ if(APPLE AND NOT DEFINED CMAKE_MACOSX_RPATH) ...@@ -57,10 +57,9 @@ if(APPLE AND NOT DEFINED CMAKE_MACOSX_RPATH)
set(CMAKE_MACOSX_RPATH true) set(CMAKE_MACOSX_RPATH true)
endif() endif()
# Shared libs are currently not supported on Windows. # Auto-export all symbols from Windows DLL
if(WIN32 AND NOT CAF_BUILD_STATIC_ONLY) if(WIN32)
message(STATUS "CAF currently only supports static-only builds on Windows") set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CAF_BUILD_STATIC_ONLY yes)
endif() endif()
if(CAF_BUILD_STATIC_RUNTIME) if(CAF_BUILD_STATIC_RUNTIME)
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
namespace caf { namespace caf {
/// Implements the deserializer interface with a binary serialization protocol. /// Implements the deserializer interface with a binary serialization protocol.
class binary_deserializer final : public deserializer { class CAF_API binary_deserializer final : public deserializer {
public: public:
// -- member types ----------------------------------------------------------- // -- member types -----------------------------------------------------------
......
...@@ -261,3 +261,22 @@ struct IUnknown; ...@@ -261,3 +261,22 @@ struct IUnknown;
__FILE__, __LINE__, error); \ __FILE__, __LINE__, error); \
::abort(); \ ::abort(); \
} while (false) } while (false)
// Explicit symbol visibility macros.
#ifdef CAF_MSVC
# define CAF_API_EXPORT __declspec(dllexport)
# define CAF_API_IMPORT __declspec(dllimport)
#elif defined(CAF_CLANG) || defined(CAF_GCC)
# define CAF_API_EXPORT __attribute__ ((visibility("default")))
# define CAF_API_IMPORT
#else
# define CAF_API_EXPORT
# define CAF_API_IMPORT
#endif
#ifdef libcaf_core_shared_EXPORTS
# define CAF_API CAF_API_EXPORT
#else
# define CAF_API CAF_API_IMPORT
#endif
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "caf/config.hpp"
#include "caf/atom.hpp" #include "caf/atom.hpp"
#include "caf/string_view.hpp" #include "caf/string_view.hpp"
#include "caf/timestamp.hpp" #include "caf/timestamp.hpp"
...@@ -34,55 +35,55 @@ namespace defaults { ...@@ -34,55 +35,55 @@ namespace defaults {
namespace stream { namespace stream {
extern const timespan desired_batch_complexity; extern CAF_API const timespan desired_batch_complexity;
extern const timespan max_batch_delay; extern CAF_API const timespan max_batch_delay;
extern const timespan credit_round_interval; extern CAF_API const timespan credit_round_interval;
} // namespace streaming } // namespace streaming
namespace scheduler { namespace scheduler {
extern const atom_value policy; extern CAF_API const atom_value policy;
extern string_view profiling_output_file; extern CAF_API string_view profiling_output_file;
extern const size_t max_threads; extern CAF_API const size_t max_threads;
extern const size_t max_throughput; extern CAF_API const size_t max_throughput;
extern const timespan profiling_resolution; extern CAF_API const timespan profiling_resolution;
} // namespace scheduler } // namespace scheduler
namespace work_stealing { namespace work_stealing {
extern const size_t aggressive_poll_attempts; extern CAF_API const size_t aggressive_poll_attempts;
extern const size_t aggressive_steal_interval; extern CAF_API const size_t aggressive_steal_interval;
extern const size_t moderate_poll_attempts; extern CAF_API const size_t moderate_poll_attempts;
extern const size_t moderate_steal_interval; extern CAF_API const size_t moderate_steal_interval;
extern const timespan moderate_sleep_duration; extern CAF_API const timespan moderate_sleep_duration;
extern const size_t relaxed_steal_interval; extern CAF_API const size_t relaxed_steal_interval;
extern const timespan relaxed_sleep_duration; extern CAF_API const timespan relaxed_sleep_duration;
} // namespace work_stealing } // namespace work_stealing
namespace logger { namespace logger {
extern string_view component_filter; extern CAF_API string_view component_filter;
extern const atom_value console; extern CAF_API const atom_value console;
extern string_view console_format; extern CAF_API string_view console_format;
extern const atom_value console_verbosity; extern CAF_API const atom_value console_verbosity;
extern string_view file_format; extern CAF_API string_view file_format;
extern string_view file_name; extern CAF_API string_view file_name;
extern const atom_value file_verbosity; extern CAF_API const atom_value file_verbosity;
} // namespace logger } // namespace logger
namespace middleman { namespace middleman {
extern std::vector<std::string> app_identifiers; extern CAF_API std::vector<std::string> app_identifiers;
extern const atom_value network_backend; extern CAF_API const atom_value network_backend;
extern const size_t max_consecutive_reads; extern CAF_API const size_t max_consecutive_reads;
extern const size_t heartbeat_interval; extern CAF_API const size_t heartbeat_interval;
extern const size_t cached_udp_buffers; extern CAF_API const size_t cached_udp_buffers;
extern const size_t max_pending_msgs; extern CAF_API const size_t max_pending_msgs;
extern const size_t workers; extern CAF_API const size_t workers;
} // namespace middleman } // namespace middleman
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <cstring> #include <cstring>
#include "caf/config.hpp"
namespace caf { namespace caf {
namespace detail { namespace detail {
namespace parser { namespace parser {
...@@ -44,15 +46,15 @@ inline bool in_whitelist(bool (*filter)(char), char ch) { ...@@ -44,15 +46,15 @@ inline bool in_whitelist(bool (*filter)(char), char ch) {
return filter(ch); return filter(ch);
} }
extern const char alphanumeric_chars[63]; CAF_API extern const char alphanumeric_chars[63];
extern const char alphabetic_chars[53]; CAF_API extern const char alphabetic_chars[53];
extern const char hexadecimal_chars[23]; CAF_API extern const char hexadecimal_chars[23];
extern const char decimal_chars[11]; CAF_API extern const char decimal_chars[11];
extern const char octal_chars[9]; CAF_API extern const char octal_chars[9];
} // namespace parser } // namespace parser
} // namespace detail } // namespace detail
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <vector> #include <vector>
#include <cstdint> #include <cstdint>
#include "caf/config.hpp"
#include "caf/atom.hpp" #include "caf/atom.hpp"
#include "caf/fwd.hpp" #include "caf/fwd.hpp"
#include "caf/timespan.hpp" #include "caf/timespan.hpp"
...@@ -113,7 +114,7 @@ static constexpr size_t type_nrs = detail::tl_size<sorted_builtin_types>::value ...@@ -113,7 +114,7 @@ static constexpr size_t type_nrs = detail::tl_size<sorted_builtin_types>::value
+ 1; + 1;
/// List of all type names, indexed via `type_nr`. /// List of all type names, indexed via `type_nr`.
extern const char* numbered_type_names[]; CAF_API extern const char* numbered_type_names[];
template <uint32_t R, uint16_t... Is> template <uint32_t R, uint16_t... Is>
struct type_token_helper; struct type_token_helper;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment