Merge pull request #12 from klayoutmatthias/macos-build

More fixes for MacOS and happy new year :-)
This commit is contained in:
Kazunari Sekigawa 2018-01-01 07:28:04 +09:00 committed by GitHub
commit 1cd47dc6cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 36 additions and 12 deletions

View File

@ -229,8 +229,11 @@ private:
* @brief ctor from a recursive shape iterator
*/
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 ();
}

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);
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 (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
if (db::default_editable_mode ()) {
@ -608,7 +608,7 @@ TEST(2)
c0.erase (i3);
EXPECT_EQ (c2s_unsorted(c0), "");
EXPECT_EQ (c0.cell_instances (), size_t (0));
// not yet: EXPECT_EQ (c0.empty (), true);
// Not yet: EXPECT_EQ (c0.empty (), true);
}
TEST(3)

View File

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

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
*/
class Value
class GSI_PUBLIC Value
{
public:
/**

View File

@ -30,6 +30,9 @@
#ifdef _WIN32
# include <windows.h>
#elif __APPLE__
# include <libproc.h>
# include <unistd.h>
#else
# include <unistd.h>
#endif
@ -79,6 +82,15 @@ get_inst_path_internal ()
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
QFileInfo proc_exe (tl::to_qstring (tl::sprintf ("/proc/%d/exe", getpid ())));

View File

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

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
lay::set_klayout_path (std::vector<std::string> ());

View File

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