Refactored CMakeLists.txt

* new pip_module() macro
 * fixed exports
 * automatic gather all exports and pass them to Doxygen and PICodeParser
This commit is contained in:
2020-08-01 21:29:32 +03:00
parent 21111b3e67
commit c7ac4fa551
79 changed files with 389 additions and 531 deletions

View File

@@ -42,7 +42,7 @@ private:
bool loadInternal();
void getLastError();
PRIVATE_DECLARATION
PRIVATE_DECLARATION(PIP_EXPORT)
PIString libpath, liberror;
};

View File

@@ -93,7 +93,7 @@ private:
void exec_();
void startProc(bool detached);
PRIVATE_DECLARATION
PRIVATE_DECLARATION(PIP_EXPORT)
PIStringList args, env;
PIString wd;
PIByteArray out;

View File

@@ -26,7 +26,7 @@ class PIP_EXPORT PISystemInfo {
public:
PISystemInfo();
struct MountInfo {
struct PIP_EXPORT MountInfo {
MountInfo();
PIString mount_point;
PIString device;

View File

@@ -32,7 +32,7 @@ public:
~PISystemMonitor();
#pragma pack(push, 1)
struct ProcessStatsFixed {
struct PIP_EXPORT ProcessStatsFixed {
ProcessStatsFixed();
int ID;
int parent_ID;
@@ -52,7 +52,7 @@ public:
float cpu_load_user;
};
struct ThreadStatsFixed {
struct PIP_EXPORT ThreadStatsFixed {
ThreadStatsFixed();
llong id;
PISystemTime work_time;
@@ -63,7 +63,7 @@ public:
};
#pragma pack(pop)
struct ProcessStats: ProcessStatsFixed {
struct PIP_EXPORT ProcessStats: ProcessStatsFixed {
void makeStrings();
PIString exec_name;
PIString state;
@@ -74,7 +74,7 @@ public:
PIString data_memsize_readable;
};
struct ThreadStats: ThreadStatsFixed {
struct PIP_EXPORT ThreadStats: ThreadStatsFixed {
PIString name;
PIDateTime created;
};
@@ -107,10 +107,10 @@ private:
mutable PIMutex stat_mutex;
int pID_, page_size, cpu_count, cycle;
#ifndef FREERTOS
PRIVATE_DECLARATION
PRIVATE_DECLARATION(PIP_EXPORT)
#endif
class Pool {
class PIP_EXPORT Pool {
friend class PISystemMonitor;
public:
static Pool * instance();
@@ -136,9 +136,9 @@ inline PICout operator <<(PICout s, const PISystemMonitor::ThreadStats & v) {
return s;
}
PIByteArray & operator <<(PIByteArray & s, const PISystemMonitor::ProcessStats & v);
PIByteArray & operator >>(PIByteArray & s, PISystemMonitor::ProcessStats & v);
PIByteArray & operator <<(PIByteArray & s, const PISystemMonitor::ThreadStats & v);
PIByteArray & operator >>(PIByteArray & s, PISystemMonitor::ThreadStats & v);
PIP_EXPORT PIByteArray & operator <<(PIByteArray & s, const PISystemMonitor::ProcessStats & v);
PIP_EXPORT PIByteArray & operator >>(PIByteArray & s, PISystemMonitor::ProcessStats & v);
PIP_EXPORT PIByteArray & operator <<(PIByteArray & s, const PISystemMonitor::ThreadStats & v);
PIP_EXPORT PIByteArray & operator >>(PIByteArray & s, PISystemMonitor::ThreadStats & v);
#endif // PISYSTEMMONITOR_H

View File

@@ -23,16 +23,16 @@
#include "pibase.h"
namespace PISystemTests {
PIP_EXPORT extern long time_resolution_ns;
PIP_EXPORT extern long time_elapsed_ns;
PIP_EXPORT extern long usleep_offset_us;
extern PIP_EXPORT long time_resolution_ns;
extern PIP_EXPORT long time_elapsed_ns;
extern PIP_EXPORT long usleep_offset_us;
class PISystemTestReader {
class PIP_EXPORT PISystemTestReader {
public:
PISystemTestReader();
};
extern PISystemTestReader pisystestreader;
extern PIP_EXPORT PISystemTestReader pisystestreader;
}
#endif // PISYSTEMTESTS_H