mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 14:40:26 -06:00
Autogen: Extended mocInclude tests
The extended tests cover more AUTOMOC use cases.
This commit is contained in:
@@ -22,6 +22,9 @@ if (QT_TEST_VERSION STREQUAL 4)
|
||||
macro(qtx_wrap_cpp)
|
||||
qt4_wrap_cpp(${ARGN})
|
||||
endmacro()
|
||||
macro(qtx_generate_moc)
|
||||
qt4_generate_moc(${ARGN})
|
||||
endmacro()
|
||||
|
||||
else()
|
||||
if (NOT QT_TEST_VERSION STREQUAL 5)
|
||||
@@ -41,6 +44,9 @@ else()
|
||||
macro(qtx_wrap_cpp)
|
||||
qt5_wrap_cpp(${ARGN})
|
||||
endmacro()
|
||||
macro(qtx_generate_moc)
|
||||
qt5_generate_moc(${ARGN})
|
||||
endmacro()
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
43
Tests/QtAutogen/mocInclude/EObjA.cpp
Normal file
43
Tests/QtAutogen/mocInclude/EObjA.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "EObjA.hpp"
|
||||
#include "EObjAExtra.hpp"
|
||||
#include "EObjA_p.hpp"
|
||||
|
||||
class EObjALocal : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EObjALocal();
|
||||
~EObjALocal();
|
||||
};
|
||||
|
||||
EObjALocal::EObjALocal()
|
||||
{
|
||||
}
|
||||
|
||||
EObjALocal::~EObjALocal()
|
||||
{
|
||||
}
|
||||
|
||||
EObjAPrivate::EObjAPrivate()
|
||||
{
|
||||
EObjALocal localObj;
|
||||
EObjAExtra extraObj;
|
||||
}
|
||||
|
||||
EObjAPrivate::~EObjAPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
EObjA::EObjA()
|
||||
: d(new EObjAPrivate)
|
||||
{
|
||||
}
|
||||
|
||||
EObjA::~EObjA()
|
||||
{
|
||||
}
|
||||
|
||||
// For EObjALocal
|
||||
#include "EObjA.moc"
|
||||
// - Not the own header
|
||||
#include "moc_EObjAExtra.cpp"
|
||||
19
Tests/QtAutogen/mocInclude/EObjA.hpp
Normal file
19
Tests/QtAutogen/mocInclude/EObjA.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef EOBJA_HPP
|
||||
#define EOBJA_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Sources includes a moc_ includes of an extra object
|
||||
class EObjAPrivate;
|
||||
class EObjA : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EObjA();
|
||||
~EObjA();
|
||||
|
||||
private:
|
||||
EObjAPrivate* const d;
|
||||
};
|
||||
|
||||
#endif
|
||||
20
Tests/QtAutogen/mocInclude/EObjAExtra.cpp
Normal file
20
Tests/QtAutogen/mocInclude/EObjAExtra.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "EObjAExtra.hpp"
|
||||
#include "EObjAExtra_p.hpp"
|
||||
|
||||
EObjAExtraPrivate::EObjAExtraPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
EObjAExtraPrivate::~EObjAExtraPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
EObjAExtra::EObjAExtra()
|
||||
: d(new EObjAExtraPrivate)
|
||||
{
|
||||
}
|
||||
|
||||
EObjAExtra::~EObjAExtra()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
18
Tests/QtAutogen/mocInclude/EObjAExtra.hpp
Normal file
18
Tests/QtAutogen/mocInclude/EObjAExtra.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef EOBJAEXTRA_HPP
|
||||
#define EOBJAEXTRA_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class EObjAExtraPrivate;
|
||||
class EObjAExtra : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EObjAExtra();
|
||||
~EObjAExtra();
|
||||
|
||||
private:
|
||||
EObjAExtraPrivate* const d;
|
||||
};
|
||||
|
||||
#endif
|
||||
12
Tests/QtAutogen/mocInclude/EObjAExtra_p.hpp
Normal file
12
Tests/QtAutogen/mocInclude/EObjAExtra_p.hpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef EOBJAEXTRA_P_HPP
|
||||
#define EOBJAEXTRA_P_HPP
|
||||
|
||||
class EObjAExtraPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EObjAExtraPrivate();
|
||||
~EObjAExtraPrivate();
|
||||
};
|
||||
|
||||
#endif
|
||||
12
Tests/QtAutogen/mocInclude/EObjA_p.hpp
Normal file
12
Tests/QtAutogen/mocInclude/EObjA_p.hpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef EOBJA_P_HPP
|
||||
#define EOBJA_P_HPP
|
||||
|
||||
class EObjAPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EObjAPrivate();
|
||||
~EObjAPrivate();
|
||||
};
|
||||
|
||||
#endif
|
||||
44
Tests/QtAutogen/mocInclude/EObjB.cpp
Normal file
44
Tests/QtAutogen/mocInclude/EObjB.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
#include "EObjB.hpp"
|
||||
#include "EObjB_p.hpp"
|
||||
#include "subExtra/EObjBExtra.hpp"
|
||||
|
||||
class EObjBLocal : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EObjBLocal();
|
||||
~EObjBLocal();
|
||||
};
|
||||
|
||||
EObjBLocal::EObjBLocal()
|
||||
{
|
||||
}
|
||||
|
||||
EObjBLocal::~EObjBLocal()
|
||||
{
|
||||
}
|
||||
|
||||
EObjBPrivate::EObjBPrivate()
|
||||
{
|
||||
EObjBLocal localObj;
|
||||
EObjBExtra extraObj;
|
||||
}
|
||||
|
||||
EObjBPrivate::~EObjBPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
EObjB::EObjB()
|
||||
: d(new EObjBPrivate)
|
||||
{
|
||||
}
|
||||
|
||||
EObjB::~EObjB()
|
||||
{
|
||||
}
|
||||
|
||||
// For EObjBLocal
|
||||
#include "EObjB.moc"
|
||||
// - Not the own header
|
||||
// - in a subdirectory
|
||||
#include "subExtra/moc_EObjBExtra.cpp"
|
||||
19
Tests/QtAutogen/mocInclude/EObjB.hpp
Normal file
19
Tests/QtAutogen/mocInclude/EObjB.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef EOBJB_HPP
|
||||
#define EOBJB_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Sources includes a moc_ includes of an extra object in a subdirectory
|
||||
class EObjBPrivate;
|
||||
class EObjB : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EObjB();
|
||||
~EObjB();
|
||||
|
||||
private:
|
||||
EObjBPrivate* const d;
|
||||
};
|
||||
|
||||
#endif
|
||||
12
Tests/QtAutogen/mocInclude/EObjB_p.hpp
Normal file
12
Tests/QtAutogen/mocInclude/EObjB_p.hpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef EOBJB_P_HPP
|
||||
#define EOBJB_P_HPP
|
||||
|
||||
class EObjBPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EObjBPrivate();
|
||||
~EObjBPrivate();
|
||||
};
|
||||
|
||||
#endif
|
||||
39
Tests/QtAutogen/mocInclude/LObjA.cpp
Normal file
39
Tests/QtAutogen/mocInclude/LObjA.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#include "LObjA.hpp"
|
||||
#include "LObjA_p.h"
|
||||
|
||||
class LObjALocal : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LObjALocal();
|
||||
~LObjALocal();
|
||||
};
|
||||
|
||||
LObjALocal::LObjALocal()
|
||||
{
|
||||
}
|
||||
|
||||
LObjALocal::~LObjALocal()
|
||||
{
|
||||
}
|
||||
|
||||
LObjAPrivate::LObjAPrivate()
|
||||
{
|
||||
LObjALocal localObj;
|
||||
}
|
||||
|
||||
LObjAPrivate::~LObjAPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
LObjA::LObjA()
|
||||
: d(new LObjAPrivate)
|
||||
{
|
||||
}
|
||||
|
||||
LObjA::~LObjA()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
#include "LObjA.moc"
|
||||
19
Tests/QtAutogen/mocInclude/LObjA.hpp
Normal file
19
Tests/QtAutogen/mocInclude/LObjA.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef LOBJA_HPP
|
||||
#define LOBJA_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Object source comes with a .moc include
|
||||
class LObjAPrivate;
|
||||
class LObjA : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LObjA();
|
||||
~LObjA();
|
||||
|
||||
private:
|
||||
LObjAPrivate* const d;
|
||||
};
|
||||
|
||||
#endif
|
||||
12
Tests/QtAutogen/mocInclude/LObjA_p.h
Normal file
12
Tests/QtAutogen/mocInclude/LObjA_p.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef LOBJA_P_HPP
|
||||
#define LOBJA_P_HPP
|
||||
|
||||
class LObjAPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LObjAPrivate();
|
||||
~LObjAPrivate();
|
||||
};
|
||||
|
||||
#endif
|
||||
40
Tests/QtAutogen/mocInclude/LObjB.cpp
Normal file
40
Tests/QtAutogen/mocInclude/LObjB.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "LObjB.hpp"
|
||||
#include "LObjB_p.h"
|
||||
|
||||
class LObjBLocal : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LObjBLocal();
|
||||
~LObjBLocal();
|
||||
};
|
||||
|
||||
LObjBLocal::LObjBLocal()
|
||||
{
|
||||
}
|
||||
|
||||
LObjBLocal::~LObjBLocal()
|
||||
{
|
||||
}
|
||||
|
||||
LObjBPrivate::LObjBPrivate()
|
||||
{
|
||||
LObjBLocal localObj;
|
||||
}
|
||||
|
||||
LObjBPrivate::~LObjBPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
LObjB::LObjB()
|
||||
: d(new LObjBPrivate)
|
||||
{
|
||||
}
|
||||
|
||||
LObjB::~LObjB()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
#include "LObjB.moc"
|
||||
#include "moc_LObjB.cpp"
|
||||
19
Tests/QtAutogen/mocInclude/LObjB.hpp
Normal file
19
Tests/QtAutogen/mocInclude/LObjB.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef LLObjB_HPP
|
||||
#define LLObjB_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Object source comes with a .moc and a _moc include
|
||||
class LObjBPrivate;
|
||||
class LObjB : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LObjB();
|
||||
~LObjB();
|
||||
|
||||
private:
|
||||
LObjBPrivate* const d;
|
||||
};
|
||||
|
||||
#endif
|
||||
12
Tests/QtAutogen/mocInclude/LObjB_p.h
Normal file
12
Tests/QtAutogen/mocInclude/LObjB_p.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef LOBJB_P_HPP
|
||||
#define LOBJB_P_HPP
|
||||
|
||||
class LObjBPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LObjBPrivate();
|
||||
~LObjBPrivate();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,24 +1,20 @@
|
||||
#include "ObjA.hpp"
|
||||
#include "ObjA_p.h"
|
||||
|
||||
class SubObjA : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SubObjA() {}
|
||||
~SubObjA() {}
|
||||
|
||||
Q_SLOT
|
||||
void aSlot();
|
||||
};
|
||||
|
||||
void SubObjA::aSlot()
|
||||
ObjAPrivate::ObjAPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
void ObjA::go()
|
||||
ObjAPrivate::~ObjAPrivate()
|
||||
{
|
||||
SubObjA subObj;
|
||||
}
|
||||
|
||||
#include "ObjA.moc"
|
||||
ObjA::ObjA()
|
||||
: d(new ObjAPrivate)
|
||||
{
|
||||
}
|
||||
|
||||
ObjA::~ObjA()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
@@ -3,11 +3,17 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Object source comes without any _moc/.moc includes
|
||||
class ObjAPrivate;
|
||||
class ObjA : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_SLOT
|
||||
void go();
|
||||
public:
|
||||
ObjA();
|
||||
~ObjA();
|
||||
|
||||
private:
|
||||
ObjAPrivate* const d;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
12
Tests/QtAutogen/mocInclude/ObjA_p.h
Normal file
12
Tests/QtAutogen/mocInclude/ObjA_p.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef OBJA_P_HPP
|
||||
#define OBJA_P_HPP
|
||||
|
||||
class ObjAPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObjAPrivate();
|
||||
~ObjAPrivate();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,25 +1,22 @@
|
||||
#include "ObjB.hpp"
|
||||
#include "ObjB_p.h"
|
||||
|
||||
class SubObjB : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SubObjB() {}
|
||||
~SubObjB() {}
|
||||
|
||||
Q_SLOT
|
||||
void aSlot();
|
||||
};
|
||||
|
||||
void SubObjB::aSlot()
|
||||
ObjBPrivate::ObjBPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
void ObjB::go()
|
||||
ObjBPrivate::~ObjBPrivate()
|
||||
{
|
||||
SubObjB subObj;
|
||||
}
|
||||
|
||||
#include "ObjB.moc"
|
||||
ObjB::ObjB()
|
||||
: d(new ObjBPrivate)
|
||||
{
|
||||
}
|
||||
|
||||
ObjB::~ObjB()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
#include "moc_ObjB.cpp"
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
#ifndef OBJB_HPP
|
||||
#define OBJB_HPP
|
||||
#ifndef ObjB_HPP
|
||||
#define ObjB_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Object source comes with a _moc include
|
||||
class ObjBPrivate;
|
||||
class ObjB : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_SLOT
|
||||
void go();
|
||||
public:
|
||||
ObjB();
|
||||
~ObjB();
|
||||
|
||||
private:
|
||||
ObjBPrivate* const d;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
12
Tests/QtAutogen/mocInclude/ObjB_p.h
Normal file
12
Tests/QtAutogen/mocInclude/ObjB_p.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef OBJB_P_HPP
|
||||
#define OBJB_P_HPP
|
||||
|
||||
class ObjBPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObjBPrivate();
|
||||
~ObjBPrivate();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,26 +0,0 @@
|
||||
#include "ObjC.hpp"
|
||||
|
||||
class SubObjC : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SubObjC() {}
|
||||
~SubObjC() {}
|
||||
|
||||
Q_SLOT
|
||||
void aSlot();
|
||||
};
|
||||
|
||||
void SubObjC::aSlot()
|
||||
{
|
||||
}
|
||||
|
||||
void ObjC::go()
|
||||
{
|
||||
SubObjC subObj;
|
||||
}
|
||||
|
||||
#include "ObjC.moc"
|
||||
// Not the own header
|
||||
#include "moc_ObjD.cpp"
|
||||
@@ -1,13 +0,0 @@
|
||||
#ifndef OBJC_HPP
|
||||
#define OBJC_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class ObjC : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_SLOT
|
||||
void go();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,26 +0,0 @@
|
||||
#include "ObjD.hpp"
|
||||
|
||||
class SubObjD : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SubObjD() {}
|
||||
~SubObjD() {}
|
||||
|
||||
Q_SLOT
|
||||
void aSlot();
|
||||
};
|
||||
|
||||
void SubObjD::aSlot()
|
||||
{
|
||||
}
|
||||
|
||||
void ObjD::go()
|
||||
{
|
||||
SubObjD subObj;
|
||||
}
|
||||
|
||||
#include "ObjD.moc"
|
||||
// Header in subdirectory
|
||||
#include "subA/moc_SubObjA.cpp"
|
||||
@@ -1,13 +0,0 @@
|
||||
#ifndef OBJD_HPP
|
||||
#define OBJD_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class ObjD : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_SLOT
|
||||
void go();
|
||||
};
|
||||
|
||||
#endif
|
||||
11
Tests/QtAutogen/mocInclude/SObjA.cpp
Normal file
11
Tests/QtAutogen/mocInclude/SObjA.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "SObjA.hpp"
|
||||
|
||||
SObjA::SObjA()
|
||||
{
|
||||
}
|
||||
|
||||
SObjA::~SObjA()
|
||||
{
|
||||
}
|
||||
|
||||
#include "SObjA.moc"
|
||||
15
Tests/QtAutogen/mocInclude/SObjA.hpp
Normal file
15
Tests/QtAutogen/mocInclude/SObjA.hpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef SOBJA_HPP
|
||||
#define SOBJA_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Object source includes externally generated .moc file
|
||||
class SObjA : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SObjA();
|
||||
~SObjA();
|
||||
};
|
||||
|
||||
#endif
|
||||
11
Tests/QtAutogen/mocInclude/SObjB.cpp.in
Normal file
11
Tests/QtAutogen/mocInclude/SObjB.cpp.in
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "SObjB.hpp"
|
||||
|
||||
SObjB::SObjB()
|
||||
{
|
||||
}
|
||||
|
||||
SObjB::~SObjB()
|
||||
{
|
||||
}
|
||||
|
||||
#include "SObjB.moc"
|
||||
15
Tests/QtAutogen/mocInclude/SObjB.hpp.in
Normal file
15
Tests/QtAutogen/mocInclude/SObjB.hpp.in
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef SOBJB_HPP
|
||||
#define SOBJB_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Object source includes externally generated .moc file
|
||||
class SObjB : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SObjB();
|
||||
~SObjB();
|
||||
};
|
||||
|
||||
#endif
|
||||
35
Tests/QtAutogen/mocInclude/SObjC.cpp
Normal file
35
Tests/QtAutogen/mocInclude/SObjC.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "SObjC.hpp"
|
||||
|
||||
void SObjCLocalFunction();
|
||||
|
||||
class SObjCLocal : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SObjCLocal();
|
||||
~SObjCLocal();
|
||||
};
|
||||
|
||||
SObjCLocal::SObjCLocal()
|
||||
{
|
||||
}
|
||||
|
||||
SObjCLocal::~SObjCLocal()
|
||||
{
|
||||
}
|
||||
|
||||
SObjC::SObjC()
|
||||
{
|
||||
SObjCLocal localObject;
|
||||
SObjCLocalFunction();
|
||||
}
|
||||
|
||||
SObjC::~SObjC()
|
||||
{
|
||||
}
|
||||
|
||||
#include "SObjC.moc"
|
||||
#include "moc_SObjC.cpp"
|
||||
// Include moc_ file for which the header is SKIP_AUTOMOC enabled
|
||||
#include "moc_SObjCExtra.cpp"
|
||||
15
Tests/QtAutogen/mocInclude/SObjC.hpp
Normal file
15
Tests/QtAutogen/mocInclude/SObjC.hpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef SOBJC_HPP
|
||||
#define SOBJC_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Object source includes externally generated .moc file
|
||||
class SObjC : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SObjC();
|
||||
~SObjC();
|
||||
};
|
||||
|
||||
#endif
|
||||
31
Tests/QtAutogen/mocInclude/SObjCExtra.cpp
Normal file
31
Tests/QtAutogen/mocInclude/SObjCExtra.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "SObjCExtra.hpp"
|
||||
|
||||
class SObjCLocalExtra : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SObjCLocalExtra();
|
||||
~SObjCLocalExtra();
|
||||
};
|
||||
|
||||
SObjCLocalExtra::SObjCLocalExtra()
|
||||
{
|
||||
}
|
||||
|
||||
SObjCLocalExtra::~SObjCLocalExtra()
|
||||
{
|
||||
}
|
||||
|
||||
SObjCExtra::SObjCExtra()
|
||||
{
|
||||
}
|
||||
|
||||
SObjCExtra::~SObjCExtra()
|
||||
{
|
||||
}
|
||||
|
||||
// Externally generated header moc
|
||||
#include "SObjCExtra_extMoc.cpp"
|
||||
// AUTOMOC generated source moc
|
||||
#include "SObjCExtra.moc"
|
||||
15
Tests/QtAutogen/mocInclude/SObjCExtra.hpp
Normal file
15
Tests/QtAutogen/mocInclude/SObjCExtra.hpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef SOBJCEXTRA_HPP
|
||||
#define SOBJCEXTRA_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Object source includes externally generated .moc file
|
||||
class SObjCExtra : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SObjCExtra();
|
||||
~SObjCExtra();
|
||||
};
|
||||
|
||||
#endif
|
||||
4
Tests/QtAutogen/mocInclude/SObjCExtra.moc.in
Normal file
4
Tests/QtAutogen/mocInclude/SObjCExtra.moc.in
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
void SObjCLocalFunction()
|
||||
{
|
||||
}
|
||||
69
Tests/QtAutogen/mocInclude/shared.cmake
Normal file
69
Tests/QtAutogen/mocInclude/shared.cmake
Normal file
@@ -0,0 +1,69 @@
|
||||
# Test moc include patterns
|
||||
include_directories("../mocInclude")
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# Generate .moc file externally and enabled SKIP_AUTOMOC on the file
|
||||
qtx_generate_moc(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjA.hpp
|
||||
${CMAKE_CURRENT_BINARY_DIR}/SObjA.moc)
|
||||
set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjA.cpp PROPERTY SKIP_AUTOMOC ON)
|
||||
|
||||
# Generate .moc file externally from generated source file
|
||||
# and enabled SKIP_AUTOMOC on the source file
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjB.hpp.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjB.cpp.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp)
|
||||
qtx_generate_moc(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp
|
||||
${CMAKE_CURRENT_BINARY_DIR}/SObjB.moc)
|
||||
set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp PROPERTY SKIP_AUTOMOC ON)
|
||||
|
||||
# Generate moc file externally and enabled SKIP_AUTOMOC on the header
|
||||
qtx_generate_moc(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjCExtra.hpp
|
||||
${CMAKE_CURRENT_BINARY_DIR}/SObjCExtra_extMoc.cpp)
|
||||
set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjCExtra.hpp PROPERTY SKIP_AUTOMOC ON)
|
||||
# Custom target to depend on
|
||||
set(SOBJC_MOC ${CMAKE_CURRENT_BINARY_DIR}/${MOC_INCLUDE_NAME}_autogen/include/moc_SObjCExtra.cpp)
|
||||
add_custom_target("${MOC_INCLUDE_NAME}_SOBJC"
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/SObjCExtra_extMoc.cpp
|
||||
BYPRODUCTS ${SOBJC_MOC}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjCExtra.moc.in
|
||||
${SOBJC_MOC})
|
||||
|
||||
# MOC_INCLUDE_NAME must be defined by the includer
|
||||
add_executable(${MOC_INCLUDE_NAME}
|
||||
# Common sources
|
||||
../mocInclude/ObjA.cpp
|
||||
../mocInclude/ObjB.cpp
|
||||
|
||||
../mocInclude/LObjA.cpp
|
||||
../mocInclude/LObjB.cpp
|
||||
|
||||
../mocInclude/EObjA.cpp
|
||||
../mocInclude/EObjAExtra.cpp
|
||||
../mocInclude/EObjB.cpp
|
||||
../mocInclude/subExtra/EObjBExtra.cpp
|
||||
|
||||
../mocInclude/SObjA.cpp
|
||||
${CMAKE_CURRENT_BINARY_DIR}/SObjA.moc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp
|
||||
${CMAKE_CURRENT_BINARY_DIR}/SObjB.moc
|
||||
../mocInclude/SObjC.cpp
|
||||
../mocInclude/SObjCExtra.hpp
|
||||
../mocInclude/SObjCExtra.cpp
|
||||
|
||||
../mocInclude/subGlobal/GObj.cpp
|
||||
main.cpp
|
||||
)
|
||||
add_dependencies(${MOC_INCLUDE_NAME} "${MOC_INCLUDE_NAME}_SOBJC")
|
||||
target_link_libraries(${MOC_INCLUDE_NAME} ${QT_LIBRARIES})
|
||||
set_target_properties(${MOC_INCLUDE_NAME} PROPERTIES AUTOMOC ON)
|
||||
@@ -1,27 +0,0 @@
|
||||
#include "SubObjA.hpp"
|
||||
|
||||
namespace subA {
|
||||
|
||||
class SubObjA : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SubObjA() {}
|
||||
~SubObjA() {}
|
||||
|
||||
Q_SLOT
|
||||
void aSlot();
|
||||
};
|
||||
|
||||
void SubObjA::aSlot()
|
||||
{
|
||||
}
|
||||
|
||||
void ObjA::go()
|
||||
{
|
||||
SubObjA subObj;
|
||||
}
|
||||
}
|
||||
|
||||
#include "SubObjA.moc"
|
||||
@@ -1,16 +0,0 @@
|
||||
#ifndef SUBOBJA_HPP
|
||||
#define SUBOBJA_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace subA {
|
||||
|
||||
class ObjA : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_SLOT
|
||||
void go();
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,27 +0,0 @@
|
||||
#include "SubObjB.hpp"
|
||||
|
||||
namespace subB {
|
||||
|
||||
class SubObjB : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SubObjB() {}
|
||||
~SubObjB() {}
|
||||
|
||||
Q_SLOT
|
||||
void aSlot();
|
||||
};
|
||||
|
||||
void SubObjB::aSlot()
|
||||
{
|
||||
}
|
||||
|
||||
void ObjB::go()
|
||||
{
|
||||
SubObjB subObj;
|
||||
}
|
||||
}
|
||||
|
||||
#include "SubObjB.moc"
|
||||
@@ -1,16 +0,0 @@
|
||||
#ifndef SUBOBJB_HPP
|
||||
#define SUBOBJB_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace subB {
|
||||
|
||||
class ObjB : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_SLOT
|
||||
void go();
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,27 +0,0 @@
|
||||
#include "SubObjC.hpp"
|
||||
|
||||
namespace subC {
|
||||
|
||||
class SubObjC : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SubObjC() {}
|
||||
~SubObjC() {}
|
||||
|
||||
Q_SLOT
|
||||
void aSlot();
|
||||
};
|
||||
|
||||
void SubObjC::aSlot()
|
||||
{
|
||||
}
|
||||
|
||||
void ObjC::go()
|
||||
{
|
||||
SubObjC subObj;
|
||||
}
|
||||
}
|
||||
|
||||
#include "SubObjC.moc"
|
||||
@@ -1,16 +0,0 @@
|
||||
#ifndef SUBOBJC_HPP
|
||||
#define SUBOBJC_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace subC {
|
||||
|
||||
class ObjC : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_SLOT
|
||||
void go();
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
20
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.cpp
Normal file
20
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "EObjBExtra.hpp"
|
||||
#include "EObjBExtra_p.hpp"
|
||||
|
||||
EObjBExtraPrivate::EObjBExtraPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
EObjBExtraPrivate::~EObjBExtraPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
EObjBExtra::EObjBExtra()
|
||||
: d(new EObjBExtraPrivate)
|
||||
{
|
||||
}
|
||||
|
||||
EObjBExtra::~EObjBExtra()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
18
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.hpp
Normal file
18
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef EOBJBEXTRA_HPP
|
||||
#define EOBJBEXTRA_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class EObjBExtraPrivate;
|
||||
class EObjBExtra : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EObjBExtra();
|
||||
~EObjBExtra();
|
||||
|
||||
private:
|
||||
EObjBExtraPrivate* const d;
|
||||
};
|
||||
|
||||
#endif
|
||||
12
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra_p.hpp
Normal file
12
Tests/QtAutogen/mocInclude/subExtra/EObjBExtra_p.hpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef EOBJBEXTRA_P_HPP
|
||||
#define EOBJBEXTRA_P_HPP
|
||||
|
||||
class EObjBExtraPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EObjBExtraPrivate();
|
||||
~EObjBExtraPrivate();
|
||||
};
|
||||
|
||||
#endif
|
||||
41
Tests/QtAutogen/mocInclude/subGlobal/GObj.cpp
Normal file
41
Tests/QtAutogen/mocInclude/subGlobal/GObj.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#include "GObj.hpp"
|
||||
#include "GObj_p.hpp"
|
||||
|
||||
namespace subGlobal {
|
||||
|
||||
class GObjLocal : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GObjLocal();
|
||||
~GObjLocal();
|
||||
};
|
||||
|
||||
GObjLocal::GObjLocal()
|
||||
{
|
||||
}
|
||||
|
||||
GObjLocal::~GObjLocal()
|
||||
{
|
||||
}
|
||||
|
||||
GObjPrivate::GObjPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
GObjPrivate::~GObjPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
GObj::GObj()
|
||||
{
|
||||
GObjLocal localObj;
|
||||
}
|
||||
|
||||
GObj::~GObj()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// For the local QObject
|
||||
#include "GObj.moc"
|
||||
17
Tests/QtAutogen/mocInclude/subGlobal/GObj.hpp
Normal file
17
Tests/QtAutogen/mocInclude/subGlobal/GObj.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef GOBJ_HPP
|
||||
#define GOBJ_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace subGlobal {
|
||||
|
||||
class GObj : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GObj();
|
||||
~GObj();
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
15
Tests/QtAutogen/mocInclude/subGlobal/GObj_p.hpp
Normal file
15
Tests/QtAutogen/mocInclude/subGlobal/GObj_p.hpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef GOBJ_P_HPP
|
||||
#define GOBJ_P_HPP
|
||||
|
||||
namespace subGlobal {
|
||||
|
||||
class GObjPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GObjPrivate();
|
||||
~GObjPrivate();
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -2,17 +2,16 @@
|
||||
|
||||
set(CMAKE_AUTOMOC_RELAXED_MODE TRUE)
|
||||
|
||||
include_directories("../mocInclude")
|
||||
# Shared executable
|
||||
set(MOC_INCLUDE_NAME "mocIncludeRelaxed")
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/shared.cmake)
|
||||
|
||||
add_executable(mocIncludeRelaxed
|
||||
../mocInclude/ObjA.cpp
|
||||
../mocInclude/ObjB.cpp
|
||||
../mocInclude/ObjC.cpp
|
||||
../mocInclude/ObjD.cpp
|
||||
../mocInclude/subA/SubObjA.cpp
|
||||
../mocInclude/subB/SubObjB.cpp
|
||||
../mocInclude/subC/SubObjC.cpp
|
||||
main.cpp
|
||||
# Relaxed ony executable
|
||||
add_executable(mocIncludeRelaxedOnly
|
||||
RObjA.cpp
|
||||
RObjB.cpp
|
||||
RObjC.cpp
|
||||
RMain.cpp
|
||||
)
|
||||
target_link_libraries(mocIncludeRelaxed ${QT_LIBRARIES})
|
||||
set_target_properties(mocIncludeRelaxed PROPERTIES AUTOMOC ON)
|
||||
target_link_libraries(mocIncludeRelaxedOnly ${QT_LIBRARIES})
|
||||
set_target_properties(mocIncludeRelaxedOnly PROPERTIES AUTOMOC ON)
|
||||
|
||||
12
Tests/QtAutogen/mocIncludeRelaxed/RMain.cpp
Normal file
12
Tests/QtAutogen/mocIncludeRelaxed/RMain.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
// Relaxed AUTOMOC objects
|
||||
#include "RObjA.hpp"
|
||||
#include "RObjB.hpp"
|
||||
#include "RObjC.hpp"
|
||||
|
||||
int main(int argv, char** args)
|
||||
{
|
||||
RObjA rObjA;
|
||||
RObjB rObjB;
|
||||
RObjC rObjC;
|
||||
return 0;
|
||||
}
|
||||
12
Tests/QtAutogen/mocIncludeRelaxed/RObjA.cpp
Normal file
12
Tests/QtAutogen/mocIncludeRelaxed/RObjA.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "RObjA.hpp"
|
||||
|
||||
RObjA::RObjA()
|
||||
{
|
||||
}
|
||||
|
||||
RObjA::~RObjA()
|
||||
{
|
||||
}
|
||||
|
||||
// Relaxed include should moc the header instead
|
||||
#include "RObjA.moc"
|
||||
14
Tests/QtAutogen/mocIncludeRelaxed/RObjA.hpp
Normal file
14
Tests/QtAutogen/mocIncludeRelaxed/RObjA.hpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef ROBJA_HPP
|
||||
#define ROBJA_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class RObjA : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RObjA();
|
||||
~RObjA();
|
||||
};
|
||||
|
||||
#endif
|
||||
22
Tests/QtAutogen/mocIncludeRelaxed/RObjB.cpp
Normal file
22
Tests/QtAutogen/mocIncludeRelaxed/RObjB.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "RObjB.hpp"
|
||||
#include "RObjBExtra.hpp"
|
||||
|
||||
RObjBExtra::RObjBExtra()
|
||||
{
|
||||
}
|
||||
|
||||
RObjBExtra::~RObjBExtra()
|
||||
{
|
||||
}
|
||||
|
||||
RObjB::RObjB()
|
||||
{
|
||||
RObjBExtra extraObject;
|
||||
}
|
||||
|
||||
RObjB::~RObjB()
|
||||
{
|
||||
}
|
||||
|
||||
// Relaxed mode should run moc on RObjBExtra.hpp instead
|
||||
#include "RObjBExtra.moc"
|
||||
14
Tests/QtAutogen/mocIncludeRelaxed/RObjB.hpp
Normal file
14
Tests/QtAutogen/mocIncludeRelaxed/RObjB.hpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef ROBJB_HPP
|
||||
#define ROBJB_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class RObjB : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RObjB();
|
||||
~RObjB();
|
||||
};
|
||||
|
||||
#endif
|
||||
14
Tests/QtAutogen/mocIncludeRelaxed/RObjBExtra.hpp
Normal file
14
Tests/QtAutogen/mocIncludeRelaxed/RObjBExtra.hpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef ROBJBEXTRA_HPP
|
||||
#define ROBJBEXTRA_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class RObjBExtra : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RObjBExtra();
|
||||
~RObjBExtra();
|
||||
};
|
||||
|
||||
#endif
|
||||
30
Tests/QtAutogen/mocIncludeRelaxed/RObjC.cpp
Normal file
30
Tests/QtAutogen/mocIncludeRelaxed/RObjC.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "RObjC.hpp"
|
||||
#include <QObject>
|
||||
|
||||
class RObjCPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RObjCPrivate();
|
||||
~RObjCPrivate();
|
||||
};
|
||||
|
||||
RObjCPrivate::RObjCPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
RObjCPrivate::~RObjCPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
RObjC::RObjC()
|
||||
{
|
||||
RObjCPrivate privateObject;
|
||||
}
|
||||
|
||||
RObjC::~RObjC()
|
||||
{
|
||||
}
|
||||
|
||||
// Relaxed include should moc this source instead of the header
|
||||
#include "moc_RObjC.cpp"
|
||||
14
Tests/QtAutogen/mocIncludeRelaxed/RObjC.hpp
Normal file
14
Tests/QtAutogen/mocIncludeRelaxed/RObjC.hpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef ROBJC_HPP
|
||||
#define ROBJC_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class RObjC : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RObjC();
|
||||
~RObjC();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,14 +1,26 @@
|
||||
#include "EObjA.hpp"
|
||||
#include "EObjB.hpp"
|
||||
#include "LObjA.hpp"
|
||||
#include "LObjB.hpp"
|
||||
#include "ObjA.hpp"
|
||||
#include "ObjB.hpp"
|
||||
#include "ObjC.hpp"
|
||||
#include "SObjA.hpp"
|
||||
#include "SObjB.hpp"
|
||||
#include "subGlobal/GObj.hpp"
|
||||
|
||||
int main(int argv, char** args)
|
||||
{
|
||||
subGlobal::GObj gObj;
|
||||
ObjA objA;
|
||||
ObjB objB;
|
||||
ObjC objC;
|
||||
LObjA lObjA;
|
||||
LObjB lObjB;
|
||||
EObjA eObjA;
|
||||
EObjB eObjB;
|
||||
SObjA sObjA;
|
||||
SObjB sObjB;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Header in global subdirectory
|
||||
#include "subB/moc_SubObjB.cpp"
|
||||
#include "subGlobal/moc_GObj.cpp"
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
# Test moc include patterns
|
||||
|
||||
set(CMAKE_AUTOMOC_RELAXED_MODE FALSE)
|
||||
set(MOC_INCLUDE_NAME "mocIncludeStrict")
|
||||
|
||||
include_directories("../mocInclude")
|
||||
|
||||
add_executable(mocIncludeStrict
|
||||
../mocInclude/ObjA.cpp
|
||||
../mocInclude/ObjB.cpp
|
||||
../mocInclude/ObjC.cpp
|
||||
../mocInclude/ObjD.cpp
|
||||
../mocInclude/subA/SubObjA.cpp
|
||||
../mocInclude/subB/SubObjB.cpp
|
||||
../mocInclude/subC/SubObjC.cpp
|
||||
main.cpp
|
||||
)
|
||||
target_link_libraries(mocIncludeStrict ${QT_LIBRARIES})
|
||||
set_target_properties(mocIncludeStrict PROPERTIES AUTOMOC ON)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/shared.cmake)
|
||||
|
||||
@@ -1,14 +1,26 @@
|
||||
#include "EObjA.hpp"
|
||||
#include "EObjB.hpp"
|
||||
#include "LObjA.hpp"
|
||||
#include "LObjB.hpp"
|
||||
#include "ObjA.hpp"
|
||||
#include "ObjB.hpp"
|
||||
#include "ObjC.hpp"
|
||||
#include "SObjA.hpp"
|
||||
#include "SObjB.hpp"
|
||||
#include "subGlobal/GObj.hpp"
|
||||
|
||||
int main(int argv, char** args)
|
||||
{
|
||||
subGlobal::GObj gObj;
|
||||
ObjA objA;
|
||||
ObjB objB;
|
||||
ObjC objC;
|
||||
LObjA lObjA;
|
||||
LObjB lObjB;
|
||||
EObjA eObjA;
|
||||
EObjB eObjB;
|
||||
SObjA sObjA;
|
||||
SObjB sObjB;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Header in global subdirectory
|
||||
#include "subB/moc_SubObjB.cpp"
|
||||
#include "subGlobal/moc_GObj.cpp"
|
||||
|
||||
Reference in New Issue
Block a user