Merge remote-tracking branch 'upstream/macos-build' into TB-deploy

This commit is contained in:
Kazunari Sekigawa 2018-01-01 07:29:44 +09:00
commit 1e4098f5f8
49 changed files with 176 additions and 96 deletions

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define ANT_PUBLIC __attribute__ ((visibility ("default"))) # define ANT_PUBLIC __attribute__ ((visibility ("default")))
# define ANT_LOCAL __attribute__ ((visibility ("hidden"))) # define ANT_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define BD_PUBLIC __attribute__ ((visibility ("default"))) # define BD_PUBLIC __attribute__ ((visibility ("default")))
# define BD_LOCAL __attribute__ ((visibility ("hidden"))) # define BD_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -57,7 +57,7 @@ class ArrayRepository;
*/ */
template <class C, class R = C> template <class C, class R = C>
struct box struct DB_PUBLIC box
{ {
typedef C coord_type; typedef C coord_type;
typedef box<C, R> box_type; typedef box<C, R> box_type;

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define DB_PUBLIC __attribute__ ((visibility ("default"))) # define DB_PUBLIC __attribute__ ((visibility ("default")))
# define DB_LOCAL __attribute__ ((visibility ("hidden"))) # define DB_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -42,7 +42,7 @@ template <class C> class generic_repository;
class ArrayRepository; class ArrayRepository;
template <class C> template <class C>
class edge class DB_PUBLIC edge
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -40,7 +40,7 @@
namespace db { namespace db {
template <class C> template <class C>
class edge_pair class DB_PUBLIC edge_pair
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -229,8 +229,11 @@ private:
* @brief ctor from a recursive shape iterator * @brief ctor from a recursive shape iterator
*/ */
EdgesIterator (const db::RecursiveShapeIterator &iter, const db::ICplxTrans &trans) EdgesIterator (const db::RecursiveShapeIterator &iter, const db::ICplxTrans &trans)
: m_rec_iter (iter), m_iter_trans (trans) : m_rec_iter (iter), m_iter_trans (trans), m_from (), m_to ()
{ {
// NOTE: the following initialization appears to be required on some compilers
// (specifically MacOS/clang) to ensure the proper initialization of the iterators
m_from = m_to;
set (); set ();
} }

View File

@ -43,7 +43,7 @@ template <class C> class vector;
*/ */
template <class C> template <class C>
class point class DB_PUBLIC point
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -1364,7 +1364,7 @@ private:
*/ */
template <class C> template <class C>
class polygon class DB_PUBLIC polygon
{ {
public: public:
typedef C coord_type; typedef C coord_type;
@ -2324,7 +2324,7 @@ private:
*/ */
template <class C> template <class C>
class simple_polygon class DB_PUBLIC simple_polygon
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -222,7 +222,7 @@ private:
*/ */
template <class C> template <class C>
class text class DB_PUBLIC text
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -42,8 +42,8 @@ namespace tl {
namespace db { namespace db {
template <class I, class F, class R = double> class complex_trans; template <class I, class F, class R = double> class DB_PUBLIC complex_trans;
template <class C> class simple_trans; template <class C> class DB_PUBLIC simple_trans;
template <class C> class disp_trans; template <class C> class disp_trans;
template <class C> class fixpoint_trans; template <class C> class fixpoint_trans;
@ -1035,7 +1035,7 @@ operator<< (std::ostream &os, const disp_trans<C> &t)
*/ */
template <class C> template <class C>
class simple_trans class DB_PUBLIC simple_trans
: public fixpoint_trans<C> : public fixpoint_trans<C>
{ {
public: public:
@ -1439,7 +1439,7 @@ operator<< (std::ostream &os, const simple_trans<C> &t)
* type used internally for representing the floating-point members). * type used internally for representing the floating-point members).
*/ */
template <class I, class F, class R> template <class I, class F, class R>
class complex_trans class DB_PUBLIC complex_trans
{ {
public: public:
typedef I coord_type; typedef I coord_type;

View File

@ -45,7 +45,7 @@ template <class C> class point;
*/ */
template <class C> template <class C>
class vector class DB_PUBLIC vector
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -570,13 +570,13 @@ TEST(2)
} }
c0.erase (i4);
EXPECT_EQ (c2s_unsorted(c0), "5[r0 *1 0,0]#2,3[r0 *1 0,0]#13");
EXPECT_EQ (c0.cell_instances (), size_t (2));
c0.erase (i5); c0.erase (i5);
EXPECT_EQ (c2s_unsorted(c0), "5[r0 *1 0,0]#2,1[r0 *1 0,0]#1");
EXPECT_EQ (c0.cell_instances (), size_t (2));
c0.erase (i4);
EXPECT_EQ (c2s_unsorted(c0), "5[r0 *1 0,0]#2"); EXPECT_EQ (c2s_unsorted(c0), "5[r0 *1 0,0]#2");
EXPECT_EQ (c0.cell_instances (), size_t (1)); EXPECT_EQ (c0.cell_instances (), size_t (1));
// not yet: EXPECT_EQ (c0.empty (), false); // Not yet: EXPECT_EQ (c0.empty (), false);
// note: double delete is not supported in non-editable mode // note: double delete is not supported in non-editable mode
if (db::default_editable_mode ()) { if (db::default_editable_mode ()) {
@ -608,7 +608,7 @@ TEST(2)
c0.erase (i3); c0.erase (i3);
EXPECT_EQ (c2s_unsorted(c0), ""); EXPECT_EQ (c2s_unsorted(c0), "");
EXPECT_EQ (c0.cell_instances (), size_t (0)); EXPECT_EQ (c0.cell_instances (), size_t (0));
// not yet: EXPECT_EQ (c0.empty (), true); // Not yet: EXPECT_EQ (c0.empty (), true);
} }
TEST(3) TEST(3)

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define DRC_PUBLIC __attribute__ ((visibility ("default"))) # define DRC_PUBLIC __attribute__ ((visibility ("default")))
# define DRC_LOCAL __attribute__ ((visibility ("hidden"))) # define DRC_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define EDT_PUBLIC __attribute__ ((visibility ("default"))) # define EDT_PUBLIC __attribute__ ((visibility ("default")))
# define EDT_LOCAL __attribute__ ((visibility ("hidden"))) # define EDT_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define EXT_PUBLIC __attribute__ ((visibility ("default"))) # define EXT_PUBLIC __attribute__ ((visibility ("default")))
# define EXT_LOCAL __attribute__ ((visibility ("hidden"))) # define EXT_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -34,7 +34,7 @@ namespace gsi
* *
* This class is specialized to implement the actual call process later. * This class is specialized to implement the actual call process later.
*/ */
struct Callee struct GSI_PUBLIC Callee
: public tl::Object : public tl::Object
{ {
Callee () { } Callee () { }
@ -49,7 +49,7 @@ struct Callee
* This object holds informations about the actual implementation of the callback * This object holds informations about the actual implementation of the callback
* on the scripting client's side. * on the scripting client's side.
*/ */
struct Callback struct Callback
{ {
Callback () Callback ()
: id (-1), callee (0), argsize (0), retsize (0) : id (-1), callee (0), argsize (0), retsize (0)

View File

@ -116,7 +116,7 @@ void _var_user_read_impl (T * /*a*/, tl::Extractor & /*ex*/, tl::false_tag)
* @brief A VariantUserClassBase specialization that links GSI classes and Variant classes * @brief A VariantUserClassBase specialization that links GSI classes and Variant classes
*/ */
template <class T> template <class T>
class VariantUserClass class GSI_PUBLIC VariantUserClass
: public tl::VariantUserClass<T>, private VariantUserClassImpl : public tl::VariantUserClass<T>, private VariantUserClassImpl
{ {
public: public:
@ -551,7 +551,7 @@ public:
* the given methods. * the given methods.
*/ */
template <class X> template <class X>
class ClassExt class GSI_PUBLIC ClassExt
: public ClassBase : public ClassBase
{ {
public: public:
@ -708,7 +708,7 @@ struct adaptor_type_info<X, NoAdaptorTag>
* or to call it's methods in some generic way. * or to call it's methods in some generic way.
*/ */
template <class X, class Adapted = NoAdaptorTag> template <class X, class Adapted = NoAdaptorTag>
class Class class GSI_PUBLIC Class
: public ClassBase : public ClassBase
{ {
public: public:
@ -937,7 +937,7 @@ public:
* a subclass of the parent. * a subclass of the parent.
*/ */
template <class P, class X, class Adapted = NoAdaptorTag> template <class P, class X, class Adapted = NoAdaptorTag>
class ChildClass class GSI_PUBLIC ChildClass
: public Class<X, Adapted> : public Class<X, Adapted>
{ {
public: public:
@ -970,7 +970,7 @@ public:
* a subclass of the parent. * a subclass of the parent.
*/ */
template <class P, class X, class B, class Adapted = NoAdaptorTag> template <class P, class X, class B, class Adapted = NoAdaptorTag>
class ChildSubClass class GSI_PUBLIC ChildSubClass
: public SubClass<X, B, Adapted> : public SubClass<X, B, Adapted>
{ {
public: public:

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define GSI_PUBLIC __attribute__ ((visibility ("default"))) # define GSI_PUBLIC __attribute__ ((visibility ("default")))
# define GSI_LOCAL __attribute__ ((visibility ("hidden"))) # define GSI_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -37,7 +37,7 @@ namespace gsi
/** /**
* @brief Provides a basic implementation for a "boxed" plain value using a Variant as the basic type * @brief Provides a basic implementation for a "boxed" plain value using a Variant as the basic type
*/ */
class Value class GSI_PUBLIC Value
{ {
public: public:
/** /**

View File

@ -34,9 +34,9 @@
namespace gsi namespace gsi
{ {
class ClassBase; class GSI_PUBLIC ClassBase;
struct NoAdaptorTag; struct NoAdaptorTag;
template <class T, class A> class Class; template <class T, class A> class GSI_PUBLIC Class;
/** /**
* @brief The implementation delegate for the VariantUserClass<T> * @brief The implementation delegate for the VariantUserClass<T>

View File

@ -35,7 +35,7 @@
namespace gsi namespace gsi
{ {
class ClassBase; class GSI_PUBLIC ClassBase;
/** /**
* @brief Definition of the client indexes * @brief Definition of the client indexes

View File

@ -30,7 +30,7 @@
namespace gsi namespace gsi
{ {
class ClassBase; class GSI_PUBLIC ClassBase;
/** /**
* @brief Implements an object holder * @brief Implements an object holder

View File

@ -55,19 +55,19 @@ namespace gsi
// --------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------
// Type system of GSI // Type system of GSI
class SerialArgs; class GSI_PUBLIC SerialArgs;
class VectorAdaptor; class GSI_PUBLIC VectorAdaptor;
class MapAdaptor; class GSI_PUBLIC MapAdaptor;
class StringAdaptor; class GSI_PUBLIC StringAdaptor;
class VariantAdaptor; class GSI_PUBLIC VariantAdaptor;
class ClassBase; class GSI_PUBLIC ClassBase;
struct NoAdaptorTag; struct NoAdaptorTag;
template <class X, class A> class Class; template <class X, class A> class GSI_PUBLIC Class;
template <class X> struct ClassTag; template <class X> struct ClassTag;
template <class I> class IterAdaptor; template <class I> class GSI_PUBLIC IterAdaptor;
template <class V> class IterPtrAdaptor; template <class V> class GSI_PUBLIC IterPtrAdaptor;
template <class V> class ConstIterPtrAdaptor; template <class V> class GSI_PUBLIC ConstIterPtrAdaptor;
template <class I> class FreeIterAdaptor; template <class I> class GSI_PUBLIC FreeIterAdaptor;
template <class X> const ClassBase *cls_decl (); template <class X> const ClassBase *cls_decl ();
/** /**

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define GSIQT_PUBLIC __attribute__ ((visibility ("default"))) # define GSIQT_PUBLIC __attribute__ ((visibility ("default")))
# define GSIQT_LOCAL __attribute__ ((visibility ("hidden"))) # define GSIQT_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define IMG_PUBLIC __attribute__ ((visibility ("default"))) # define IMG_PUBLIC __attribute__ ((visibility ("default")))
# define IMG_LOCAL __attribute__ ((visibility ("hidden"))) # define IMG_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define LAY_PUBLIC __attribute__ ((visibility ("default"))) # define LAY_PUBLIC __attribute__ ((visibility ("default")))
# define LAY_LOCAL __attribute__ ((visibility ("hidden"))) # define LAY_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -55,7 +55,7 @@ typedef void (*klp_init_func_t) (void (**autorun) (), void (**autorun_early) (),
# if defined _WIN32 || defined __CYGWIN__ # if defined _WIN32 || defined __CYGWIN__
# define KLP_PUBLIC __declspec(dllexport) # define KLP_PUBLIC __declspec(dllexport)
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define KLP_PUBLIC __attribute__ ((visibility ("default"))) # define KLP_PUBLIC __attribute__ ((visibility ("default")))
# else # else
# define KLP_PUBLIC # define KLP_PUBLIC

View File

@ -30,7 +30,7 @@
#include "imgService.h" #include "imgService.h"
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QMenuBar> #include <QFrame>
#include <QLabel> #include <QLabel>
namespace lay namespace lay
@ -443,7 +443,8 @@ Navigator::Navigator (MainWindow *main_window)
{ {
setObjectName (QString::fromUtf8 ("navigator")); setObjectName (QString::fromUtf8 ("navigator"));
mp_menu_bar = new QMenuBar (this); mp_menu_bar = new QFrame (this);
mp_menu_bar->setFrameShape (QFrame::NoFrame);
mp_menu_bar->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Preferred); mp_menu_bar->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Preferred);
mp_view = new LayoutView (0, false, mp_main_window, this, "navigator", LayoutView::LV_Naked + LayoutView::LV_NoZoom + LayoutView::LV_NoServices + LayoutView::LV_NoGrid); mp_view = new LayoutView (0, false, mp_main_window, this, "navigator", LayoutView::LV_Naked + LayoutView::LV_NoZoom + LayoutView::LV_NoServices + LayoutView::LV_NoGrid);

View File

@ -33,7 +33,7 @@
class QCloseEvent; class QCloseEvent;
class QShowEvent; class QShowEvent;
class QMenuBar; class QFrame;
class QLabel; class QLabel;
namespace lay namespace lay
@ -102,7 +102,7 @@ private:
MainWindow *mp_main_window; MainWindow *mp_main_window;
LayoutView *mp_view; LayoutView *mp_view;
QLabel *mp_placeholder_label; QLabel *mp_placeholder_label;
QMenuBar *mp_menu_bar; QFrame *mp_menu_bar;
LayoutView *mp_source_view; LayoutView *mp_source_view;
NavigatorService *mp_service; NavigatorService *mp_service;
tl::DeferredMethod<Navigator> m_do_view_changed; tl::DeferredMethod<Navigator> m_do_view_changed;

View File

@ -30,6 +30,9 @@
#ifdef _WIN32 #ifdef _WIN32
# include <windows.h> # include <windows.h>
#elif __APPLE__
# include <libproc.h>
# include <unistd.h>
#else #else
# include <unistd.h> # include <unistd.h>
#endif #endif
@ -79,6 +82,15 @@ get_inst_path_internal ()
return tl::to_string (fi.absolutePath ()); return tl::to_string (fi.absolutePath ());
} }
#elif __APPLE__
char buffer[PROC_PIDPATHINFO_MAXSIZE];
int ret = proc_pidpath (getpid (), buffer, sizeof (buffer));
if (ret > 0) {
// TODO: does this correctly translate paths? (MacOS uses UTF-8 encoding with D-like normalization)
return tl::to_string (QFileInfo (QString::fromUtf8 (buffer)).absolutePath ());
}
#else #else
QFileInfo proc_exe (tl::to_qstring (tl::sprintf ("/proc/%d/exe", getpid ()))); QFileInfo proc_exe (tl::to_qstring (tl::sprintf ("/proc/%d/exe", getpid ())));

View File

@ -37,6 +37,7 @@
#include <QToolButton> #include <QToolButton>
#include <QApplication> #include <QApplication>
#include <QMessageBox> #include <QMessageBox>
#include <QHBoxLayout>
#include <ctype.h> #include <ctype.h>
@ -903,31 +904,61 @@ AbstractMenu::make_exclusive_group (const std::string &name)
} }
void void
AbstractMenu::build_detached (const std::string &name, QMenuBar *mbar) AbstractMenu::build_detached (const std::string &name, QFrame *mbar)
{ {
// Clean up the menu bar before rebuilding
if (mbar->layout ()) {
delete mbar->layout ();
}
QObjectList children = mbar->children ();
for (QObjectList::const_iterator c = children.begin (); c != children.end (); ++c) {
if (dynamic_cast<QToolButton *> (*c)) {
delete *c;
}
}
QHBoxLayout *menu_layout = new QHBoxLayout (mbar);
menu_layout->setMargin (0);
mbar->setLayout (menu_layout);
AbstractMenuItem *item = find_item_exact ("@@" + name); AbstractMenuItem *item = find_item_exact ("@@" + name);
tl_assert (item != 0); tl_assert (item != 0);
mbar->clear ();
for (std::list<AbstractMenuItem>::iterator c = item->children.begin (); c != item->children.end (); ++c) { for (std::list<AbstractMenuItem>::iterator c = item->children.begin (); c != item->children.end (); ++c) {
if (c->has_submenu ()) { if (c->has_submenu ()) {
QToolButton *menu_button = new QToolButton (mbar);
menu_layout->addWidget (menu_button);
menu_button->setAutoRaise (true);
menu_button->setPopupMode (QToolButton::MenuButtonPopup);
menu_button->setText (tl::to_qstring (c->action ().get_title ()));
if (c->menu () == 0) { if (c->menu () == 0) {
c->set_menu (mbar->addMenu (tl::to_qstring (c->action ().get_title ()))); QMenu *menu = new QMenu (mbar);
c->set_action (Action (new ActionHandle (c->menu ()->menuAction (), false)), true); menu_button->setMenu (menu);
c->set_menu (menu);
c->set_action (Action (new ActionHandle (menu->menuAction (), false)), true);
} else { } else {
mbar->addMenu (c->menu ()); menu_button->setMenu (c->menu ());
} }
build (c->menu (), c->children); build (c->menu (), c->children);
} else { } else {
mbar->addAction (c->action ().qaction ());
QAction *action = c->action ().qaction ();
QToolButton *menu_button = new QToolButton (mbar);
menu_layout->addWidget (menu_button);
menu_button->setAutoRaise (true);
menu_button->setDefaultAction (action);
} }
} }
menu_layout->addStretch (1);
} }
void void
@ -1521,4 +1552,3 @@ AbstractMenu::collect_group (std::vector<std::string> &grp, const std::string &n
} }
} }

View File

@ -42,6 +42,7 @@
#include "tlObject.h" #include "tlObject.h"
#include "laybasicCommon.h" #include "laybasicCommon.h"
class QFrame;
class QMenuBar; class QMenuBar;
class QToolBar; class QToolBar;
class QMenu; class QMenu;
@ -681,7 +682,7 @@ public:
* @param name The name of the detached menu, without the "@" * @param name The name of the detached menu, without the "@"
* @param mbar The menu bar into which to build the menu * @param mbar The menu bar into which to build the menu
*/ */
void build_detached (const std::string &name, QMenuBar *mbar); void build_detached (const std::string &name, QFrame *mbar);
/** /**
* @brief Get the reference to a QMenu object * @brief Get the reference to a QMenu object

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define LAYBASIC_PUBLIC __attribute__ ((visibility ("default"))) # define LAYBASIC_PUBLIC __attribute__ ((visibility ("default")))
# define LAYBASIC_LOCAL __attribute__ ((visibility ("hidden"))) # define LAYBASIC_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define LYM_PUBLIC __attribute__ ((visibility ("default"))) # define LYM_PUBLIC __attribute__ ((visibility ("default")))
# define LYM_LOCAL __attribute__ ((visibility ("hidden"))) # define LYM_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define PYA_PUBLIC __attribute__ ((visibility ("default"))) # define PYA_PUBLIC __attribute__ ((visibility ("default")))
# define PYA_LOCAL __attribute__ ((visibility ("hidden"))) # define PYA_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -36,8 +36,8 @@
namespace gsi namespace gsi
{ {
class ClassBase; class GSI_PUBLIC ClassBase;
class ArgType; class GSI_PUBLIC ArgType;
} }
namespace pya namespace pya

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define PYA_PUBLIC __attribute__ ((visibility ("default"))) # define PYA_PUBLIC __attribute__ ((visibility ("default")))
# define PYA_LOCAL __attribute__ ((visibility ("hidden"))) # define PYA_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define RBA_PUBLIC __attribute__ ((visibility ("default"))) # define RBA_PUBLIC __attribute__ ((visibility ("default")))
# define RBA_LOCAL __attribute__ ((visibility ("hidden"))) # define RBA_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define RBA_PUBLIC __attribute__ ((visibility ("default"))) # define RBA_PUBLIC __attribute__ ((visibility ("default")))
# define RBA_LOCAL __attribute__ ((visibility ("hidden"))) # define RBA_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define RDB_PUBLIC __attribute__ ((visibility ("default"))) # define RDB_PUBLIC __attribute__ ((visibility ("default")))
# define RDB_LOCAL __attribute__ ((visibility ("hidden"))) # define RDB_LOCAL __attribute__ ((visibility ("hidden")))
# else # else

View File

@ -35,7 +35,7 @@
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define TL_PUBLIC __attribute__ ((visibility ("default"))) # define TL_PUBLIC __attribute__ ((visibility ("default")))
# define TL_LOCAL __attribute__ ((visibility ("hidden"))) # define TL_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
@ -45,4 +45,28 @@
# endif # endif
// NOTE: this is required because we have some forward declarations to
// gsi::Class and gsi::ClassBase in tlVariant.h.
// TODO: there should not be any dependency of tl on gsi.
# if defined _WIN32 || defined __CYGWIN__
# ifdef MAKE_GSI_LIBRARY
# define GSI_PUBLIC __declspec(dllexport)
# else
# define GSI_PUBLIC __declspec(dllimport)
# endif
# define GSI_LOCAL
# else
# if __GNUC__ >= 4 || defined(__clang__)
# define GSI_PUBLIC __attribute__ ((visibility ("default")))
# define GSI_LOCAL __attribute__ ((visibility ("hidden")))
# else
# define GSI_PUBLIC
# define GSI_LOCAL
# endif
# endif
#endif #endif

View File

@ -114,12 +114,12 @@ void handle_event_exception (std::exception &ex);
* @endcode * @endcode
*/ */
template <class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class event_function_base; template <class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC event_function_base;
template <class T, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class event_function; template <class T, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC event_function;
template <class T, class D, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class event_function_with_data; template <class T, class D, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC event_function_with_data;
template <class T, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class generic_event_function; template <class T, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC generic_event_function;
template <class T, class D, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class generic_event_function_with_data; template <class T, class D, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC generic_event_function_with_data;
template <class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class event; template <class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC event;
typedef event<> Event; typedef event<> Event;
#define _COUNT 0 #define _COUNT 0

View File

@ -31,7 +31,7 @@
#endif #endif
template <_TMPLARGS> template <_TMPLARGS>
class event_function_base<_TMPLARGLISTP> class TL_PUBLIC event_function_base<_TMPLARGLISTP>
: public tl::Object : public tl::Object
{ {
public: public:
@ -42,7 +42,7 @@ public:
}; };
template <_JOIN(class T, _TMPLARGS)> template <_JOIN(class T, _TMPLARGS)>
class event_function<T, _TMPLARGLISTP> class TL_PUBLIC event_function<T, _TMPLARGLISTP>
: public event_function_base<_TMPLARGLIST> : public event_function_base<_TMPLARGLIST>
{ {
public: public:
@ -71,7 +71,7 @@ private:
}; };
template <class T, _JOIN(class D, _TMPLARGS)> template <class T, _JOIN(class D, _TMPLARGS)>
class event_function_with_data<T, D, _TMPLARGLISTP> class TL_PUBLIC event_function_with_data<T, D, _TMPLARGLISTP>
: public event_function_base<_TMPLARGLIST> : public event_function_base<_TMPLARGLIST>
{ {
public: public:
@ -101,7 +101,7 @@ private:
}; };
template <_JOIN(class T, _TMPLARGS)> template <_JOIN(class T, _TMPLARGS)>
class generic_event_function<T, _TMPLARGLISTP> class TL_PUBLIC generic_event_function<T, _TMPLARGLISTP>
: public event_function_base<_TMPLARGLIST> : public event_function_base<_TMPLARGLIST>
{ {
public: public:
@ -131,7 +131,7 @@ private:
}; };
template <class T, _JOIN(class D, _TMPLARGS)> template <class T, _JOIN(class D, _TMPLARGS)>
class generic_event_function_with_data<T, D, _TMPLARGLISTP> class TL_PUBLIC generic_event_function_with_data<T, D, _TMPLARGLISTP>
: public event_function_base<_TMPLARGLIST> : public event_function_base<_TMPLARGLIST>
{ {
public: public:
@ -162,7 +162,7 @@ private:
}; };
template <_TMPLARGS> template <_TMPLARGS>
class event<_TMPLARGLISTP> class TL_PUBLIC event<_TMPLARGLISTP>
{ {
public: public:
typedef event_function_base<_TMPLARGLISTP> func; typedef event_function_base<_TMPLARGLISTP> func;

View File

@ -137,7 +137,7 @@ private:
* @brief A "neutral" exception thrown to terminate some operation * @brief A "neutral" exception thrown to terminate some operation
* This exception is not shown. * This exception is not shown.
*/ */
struct CancelException struct TL_PUBLIC CancelException
: public Exception : public Exception
{ {
CancelException () CancelException ()
@ -148,7 +148,7 @@ struct CancelException
/** /**
* @brief A special "internal" exception class used by tl_assert * @brief A special "internal" exception class used by tl_assert
*/ */
struct InternalException struct TL_PUBLIC InternalException
: public Exception : public Exception
{ {
InternalException (const char *file, int line, const char *cond) InternalException (const char *file, int line, const char *cond)

View File

@ -240,7 +240,7 @@ private:
* This class represents a weak or shared pointer for the given type T. * This class represents a weak or shared pointer for the given type T.
*/ */
template <class T, bool Shared> template <class T, bool Shared>
class weak_or_shared_ptr class TL_PUBLIC weak_or_shared_ptr
: public WeakOrSharedPtr : public WeakOrSharedPtr
{ {
public: public:
@ -376,7 +376,7 @@ public:
* See description of tl::Object for details. * See description of tl::Object for details.
*/ */
template <class T> template <class T>
class weak_ptr class TL_PUBLIC weak_ptr
: public weak_or_shared_ptr<T, false> : public weak_or_shared_ptr<T, false>
{ {
public: public:
@ -404,7 +404,7 @@ public:
* See description of tl::Object for details. * See description of tl::Object for details.
*/ */
template <class T> template <class T>
class shared_ptr class TL_PUBLIC shared_ptr
: public weak_or_shared_ptr<T, true> : public weak_or_shared_ptr<T, true>
{ {
public: public:

View File

@ -42,9 +42,9 @@
namespace gsi namespace gsi
{ {
class ClassBase; class GSI_PUBLIC ClassBase;
struct NoAdaptorTag; struct NoAdaptorTag;
template <class T, class A> class Class; template <class T, class A> class GSI_PUBLIC Class;
template <class X> const ClassBase *cls_decl (); template <class X> const ClassBase *cls_decl ();
} }
@ -102,7 +102,7 @@ protected:
* We will employ RTTI to identify a type through that base class. * We will employ RTTI to identify a type through that base class.
*/ */
template <class T> template <class T>
class VariantUserClass class TL_PUBLIC VariantUserClass
: public VariantUserClassBase : public VariantUserClassBase
{ {
public: public:

View File

@ -365,6 +365,10 @@ main_cont (int argc, char **argv)
} }
if (! tl::TestRegistrar::instance()) {
throw tl::Exception ("No test libraries found - make sure, the *.ut files are next to the ut_runner executable.");
}
// No side effects // No side effects
lay::set_klayout_path (std::vector<std::string> ()); lay::set_klayout_path (std::vector<std::string> ());

View File

@ -6,6 +6,11 @@ include($$PWD/../with_all_libs.pri)
TEMPLATE = app TEMPLATE = app
# Don't build the ut_runner app as ordinary command line tool on MacOS
mac {
CONFIG -= app_bundle
}
TARGET = ut_runner TARGET = ut_runner
SOURCES = \ SOURCES = \