CMake - add all flags to pip_defs.h
Introspection - revert *_p files, because they are external API for introspection, not internal
This commit is contained in:
+10
-4
@@ -90,7 +90,7 @@ macro(pip_resolve_feature_flags)
|
||||
endforeach()
|
||||
foreach(_f ${PIP_FEATURE_FLAGS})
|
||||
if(${_f})
|
||||
add_definitions(-D${_f})
|
||||
add_definitions(-D${_f})
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
@@ -381,12 +381,17 @@ if(INTROSPECTION)
|
||||
add_definitions(-DPIP_INTROSPECTION)
|
||||
set(_PIP_DEFS "PIP_INTROSPECTION")
|
||||
endif()
|
||||
foreach(_f ${PIP_FEATURE_FLAGS})
|
||||
if(${_f})
|
||||
list(APPEND _PIP_DEFS "${_f}")
|
||||
endif()
|
||||
endforeach()
|
||||
if ((NOT DEFINED _PIP_SAVED_DEFS) OR (NOT "x${_PIP_SAVED_DEFS}" STREQUAL "x${_PIP_DEFS}"))
|
||||
set(_PIP_SAVED_DEFS "${_PIP_DEFS}" CACHE STRING "pip_defs" FORCE)
|
||||
file(WRITE ${_PIP_DEFS_FILE} "// This file was generated by PIP CMake, don`t edit it!\n")
|
||||
if (NOT "x${_PIP_DEFS}" STREQUAL "x")
|
||||
file(APPEND ${_PIP_DEFS_FILE} "#ifndef ${_PIP_DEFS}\n# define ${_PIP_DEFS}\n#endif\n")
|
||||
endif()
|
||||
foreach(_d ${_PIP_DEFS})
|
||||
file(APPEND ${_PIP_DEFS_FILE} "#ifndef ${_d}\n# define ${_d}\n#endif\n")
|
||||
endforeach()
|
||||
endif()
|
||||
list(APPEND HDRS ${_PIP_DEFS_FILE})
|
||||
|
||||
@@ -949,6 +954,7 @@ message(" std::iostream: ${PIP_STD_IOSTREAM}")
|
||||
message(" ICU strings : ${PIP_ICU}")
|
||||
message(" Introspection: ${PIP_INTROSPECTION}")
|
||||
message(" Coverage : ${PIP_COVERAGE}")
|
||||
message("")
|
||||
message(" Feature flags:")
|
||||
set(_max_flag_len 0)
|
||||
foreach(_f ${PIP_FEATURE_FLAGS})
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
class PIP_EXPORT PIObject {
|
||||
#ifdef PIP_INTROSPECTION
|
||||
friend PIP_EXPORT void dumpApplication(bool);
|
||||
friend class PIIntrospection;
|
||||
#endif
|
||||
friend class PIIntrospection;
|
||||
typedef PIObject __PIObject__;
|
||||
typedef void __Parent__;
|
||||
|
||||
|
||||
@@ -19,12 +19,10 @@
|
||||
|
||||
#include "piintrospection_server_p.h"
|
||||
|
||||
#ifdef PIP_INTROSPECTION
|
||||
|
||||
# include "pichunkstream.h"
|
||||
# include "piinit.h"
|
||||
# include "piobject.h"
|
||||
# include "pisysteminfo.h"
|
||||
#include "pichunkstream.h"
|
||||
#include "piinit.h"
|
||||
#include "piobject.h"
|
||||
#include "pisysteminfo.h"
|
||||
|
||||
|
||||
const uint PIIntrospection::sign = 0x0F1C2B3A;
|
||||
@@ -113,9 +111,9 @@ PIByteArray PIIntrospection::packContainers() {
|
||||
PIByteArray ret;
|
||||
PIVector<PIIntrospectionContainers::TypeInfo> data;
|
||||
PIIntrospectionContainers * p = 0;
|
||||
# ifdef PIP_INTROSPECTION
|
||||
#ifdef PIP_INTROSPECTION
|
||||
p = PIINTROSPECTION_CONTAINERS->p;
|
||||
# endif
|
||||
#endif
|
||||
if (p) {
|
||||
data = p->getInfo();
|
||||
}
|
||||
@@ -133,9 +131,9 @@ void PIIntrospection::unpackContainers(PIByteArray & ba, PIVector<PIIntrospectio
|
||||
PIByteArray PIIntrospection::packThreads() {
|
||||
PIByteArray ret;
|
||||
PIIntrospectionThreads * p = 0;
|
||||
# ifdef PIP_INTROSPECTION
|
||||
#ifdef PIP_INTROSPECTION
|
||||
p = PIINTROSPECTION_THREADS->p;
|
||||
# endif
|
||||
#endif
|
||||
if (p) {
|
||||
p->mutex.lock();
|
||||
PIMap<PIThread *, PIIntrospectionThreads::ThreadInfo> & tm(p->threads);
|
||||
@@ -172,5 +170,3 @@ void PIIntrospection::unpackObjects(PIByteArray & ba, PIVector<PIIntrospection::
|
||||
objects.clear();
|
||||
ba >> objects;
|
||||
}
|
||||
|
||||
#endif // PIP_INTROSPECTION
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "piintrospection_threads_p.h"
|
||||
#include "pisystemmonitor.h"
|
||||
|
||||
#ifdef PIP_INTROSPECTION
|
||||
|
||||
class PIP_EXPORT PIIntrospection {
|
||||
public:
|
||||
@@ -169,5 +168,4 @@ BINARY_STREAM_READ(PIIntrospection::ObjectInfo) {
|
||||
return s;
|
||||
}
|
||||
|
||||
#endif // PIP_INTROSPECTION
|
||||
#endif // PIINTROSPECTION_SERVER_P_H
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include "piintrospection_threads_p.h"
|
||||
|
||||
#ifdef PIP_INTROSPECTION
|
||||
|
||||
PIIntrospectionThreads::ThreadInfo::ThreadInfo() {
|
||||
id = delay = 0;
|
||||
@@ -79,5 +78,3 @@ void PIIntrospectionThreads::threadRunDone(PIThread * t, ullong us) {
|
||||
ThreadInfo & ti(threads[t]);
|
||||
ti.run_us = (ti.run_us * 0.8) + (us * 0.2); /// WARNING
|
||||
}
|
||||
|
||||
#endif // PIP_INTROSPECTION
|
||||
|
||||
@@ -21,11 +21,8 @@
|
||||
#define PIINTROSPECTION_THREADS_P_H
|
||||
|
||||
#include "pibase.h"
|
||||
|
||||
#ifdef PIP_INTROSPECTION
|
||||
|
||||
# include "pimap.h"
|
||||
# include "pithread.h"
|
||||
#include "pimap.h"
|
||||
#include "pithread.h"
|
||||
|
||||
|
||||
class PIP_EXPORT PIIntrospectionThreads {
|
||||
@@ -72,5 +69,4 @@ BINARY_STREAM_READ(PIIntrospectionThreads::ThreadInfo) {
|
||||
return s;
|
||||
}
|
||||
|
||||
#endif // PIP_INTROSPECTION
|
||||
#endif // PIINTROSPECTION_THREADS_P_H
|
||||
|
||||
Reference in New Issue
Block a user