add options for fftw3 precisions
configureFromFullPathDevice for all devices now trim() components
This commit is contained in:
@@ -69,6 +69,9 @@ option(STD_IOSTREAM "Building with std iostream operators support" OFF)
|
|||||||
option(INTROSPECTION "Build with introspection" OFF)
|
option(INTROSPECTION "Build with introspection" OFF)
|
||||||
option(TESTS "Build tests and perform their before install step" OFF)
|
option(TESTS "Build tests and perform their before install step" OFF)
|
||||||
option(COVERAGE "Build project with coverage info" OFF)
|
option(COVERAGE "Build project with coverage info" OFF)
|
||||||
|
option(PIP_FFTW_F "Support fftw module for float" ON)
|
||||||
|
option(PIP_FFTW_L "Support fftw module for long double" ON)
|
||||||
|
option(PIP_FFTW_Q "Support fftw module for quad double" OFF)
|
||||||
set(PIP_UTILS 1)
|
set(PIP_UTILS 1)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
@@ -436,8 +439,23 @@ if (NOT CROSSTOOLS)
|
|||||||
if (PIP_BUILD_FFTW)
|
if (PIP_BUILD_FFTW)
|
||||||
# Check if PIP support fftw3 for PIFFT using in math module
|
# Check if PIP support fftw3 for PIFFT using in math module
|
||||||
set(FFTW_LIB_NAME fftw3)
|
set(FFTW_LIB_NAME fftw3)
|
||||||
set(FFTW_LIB_SUFFIXES "" "f" "l" "q")
|
set(FFTW_LIB_SUFFIXES "")
|
||||||
|
if (PIP_FFTW_F)
|
||||||
|
list(APPEND FFTW_LIB_SUFFIXES "f")
|
||||||
|
endif()
|
||||||
|
if (PIP_FFTW_L)
|
||||||
|
list(APPEND FFTW_LIB_SUFFIXES "l")
|
||||||
|
endif()
|
||||||
|
if (PIP_FFTW_Q)
|
||||||
|
list(APPEND FFTW_LIB_SUFFIXES "q")
|
||||||
|
endif()
|
||||||
|
if (NOT "${FFTW_LIB_SUFFIXES}" STREQUAL "")
|
||||||
|
set(FFTW_LIB_SUFFIXES ";${FFTW_LIB_SUFFIXES}")
|
||||||
|
else()
|
||||||
|
list(APPEND FFTW_LIB_SUFFIXES "" "_")
|
||||||
|
endif()
|
||||||
set(FFTW_LIB_SUFFIXES2 "" "-3")
|
set(FFTW_LIB_SUFFIXES2 "" "-3")
|
||||||
|
set(FFTW_MSG "")
|
||||||
set(FFTW_LIBS)
|
set(FFTW_LIBS)
|
||||||
set(FFTW_ABS_LIBS)
|
set(FFTW_ABS_LIBS)
|
||||||
set(CMAKE_REQUIRED_INCLUDES fftw3.h)
|
set(CMAKE_REQUIRED_INCLUDES fftw3.h)
|
||||||
@@ -452,6 +470,10 @@ if (NOT CROSSTOOLS)
|
|||||||
set(${FFTW_CLN}_FOUND FALSE)
|
set(${FFTW_CLN}_FOUND FALSE)
|
||||||
set(${FFTW_CLNT}_FOUND FALSE)
|
set(${FFTW_CLNT}_FOUND FALSE)
|
||||||
if(${FFTW_CLN}_LIBRARIES)
|
if(${FFTW_CLN}_LIBRARIES)
|
||||||
|
if (NOT "${FFTW_MSG}" STREQUAL "")
|
||||||
|
set(FFTW_MSG "${FFTW_MSG}, ")
|
||||||
|
endif()
|
||||||
|
set(FFTW_MSG "${FFTW_MSG}${FFTW_CLN}")
|
||||||
set(${FFTW_CLN}_FOUND TRUE)
|
set(${FFTW_CLN}_FOUND TRUE)
|
||||||
list(APPEND FFTW_LIBS "${FFTW_CLN}")
|
list(APPEND FFTW_LIBS "${FFTW_CLN}")
|
||||||
list(APPEND FFTW_ABS_LIBS "${${FFTW_CLN}_LIBRARIES}")
|
list(APPEND FFTW_ABS_LIBS "${${FFTW_CLN}_LIBRARIES}")
|
||||||
@@ -475,7 +497,7 @@ if (NOT CROSSTOOLS)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endforeach()
|
endforeach()
|
||||||
if(FFTW_LIBS)
|
if(FFTW_LIBS)
|
||||||
pip_module(fftw "${FFTW_LIBS}" "PIP FFTW support" "" "" "")
|
pip_module(fftw "${FFTW_LIBS}" "PIP FFTW support" "" "" " (${FFTW_MSG})")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -938,7 +938,7 @@ PIString PIBinaryLog::constructFullPathDevice() const {
|
|||||||
void PIBinaryLog::configureFromFullPathDevice(const PIString & full_path) {
|
void PIBinaryLog::configureFromFullPathDevice(const PIString & full_path) {
|
||||||
const PIStringList pl = full_path.split(":");
|
const PIStringList pl = full_path.split(":");
|
||||||
for (int i = 0; i < pl.size_s(); ++i) {
|
for (int i = 0; i < pl.size_s(); ++i) {
|
||||||
const PIString p(pl[i]);
|
const PIString p(pl[i].trimmed());
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0: setLogDir(p); break;
|
case 0: setLogDir(p); break;
|
||||||
case 1: setFilePrefix(p); break;
|
case 1: setFilePrefix(p); break;
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ void PICAN::configureFromFullPathDevice(const PIString & full_path) {
|
|||||||
PIString p(pl[i]);
|
PIString p(pl[i]);
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0: setPath(p); break;
|
case 0: setPath(p); break;
|
||||||
case 1: setCANID(p.toInt(16)); break;
|
case 1: setCANID(p.trimmed().toInt(16)); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1047,7 +1047,7 @@ void PIEthernet::configureFromFullPathDevice(const PIString & full_path) {
|
|||||||
PIStringList pl = full_path.split(":");
|
PIStringList pl = full_path.split(":");
|
||||||
bool mcast = false;
|
bool mcast = false;
|
||||||
for (int i = 0; i < pl.size_s(); ++i) {
|
for (int i = 0; i < pl.size_s(); ++i) {
|
||||||
PIString p(pl[i]);
|
PIString p(pl[i].trimmed());
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0:
|
case 0:
|
||||||
p = p.toLowerCase();
|
p = p.toLowerCase();
|
||||||
|
|||||||
@@ -1067,7 +1067,7 @@ PIString PIPeer::constructFullPathDevice() const {
|
|||||||
void PIPeer::configureFromFullPathDevice(const PIString & full_path) {
|
void PIPeer::configureFromFullPathDevice(const PIString & full_path) {
|
||||||
PIStringList pl = full_path.split(":");
|
PIStringList pl = full_path.split(":");
|
||||||
for (int i = 0; i < pl.size_s(); ++i) {
|
for (int i = 0; i < pl.size_s(); ++i) {
|
||||||
PIString p(pl[i]);
|
PIString p(pl[i].trimmed());
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0: changeName(p); break;
|
case 0: changeName(p); break;
|
||||||
case 1: setTrustPeerName(p); break;
|
case 1: setTrustPeerName(p); break;
|
||||||
|
|||||||
@@ -983,7 +983,7 @@ void PISerial::configureFromFullPathDevice(const PIString & full_path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < pl.size_s(); ++i) {
|
for (int i = 0; i < pl.size_s(); ++i) {
|
||||||
PIString p(pl[i]);
|
PIString p(pl[i].trimmed());
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0: setProperty("path", p); break;
|
case 0: setProperty("path", p); break;
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ void PISharedMemory::configureFromFullPathDevice(const PIString & full_path) {
|
|||||||
initPrivate();
|
initPrivate();
|
||||||
PIStringList pl = full_path.split(":");
|
PIStringList pl = full_path.split(":");
|
||||||
for (int i = 0; i < pl.size_s(); ++i) {
|
for (int i = 0; i < pl.size_s(); ++i) {
|
||||||
PIString p(pl[i]);
|
PIString p(pl[i].trimmed());
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0: setPath(p); break;
|
case 0: setPath(p); break;
|
||||||
case 1: dsize = p.toInt(); break;
|
case 1: dsize = p.toInt(); break;
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ PIString PISPI::constructFullPathDevice() const {
|
|||||||
void PISPI::configureFromFullPathDevice(const PIString & full_path) {
|
void PISPI::configureFromFullPathDevice(const PIString & full_path) {
|
||||||
PIStringList pl = full_path.split(":");
|
PIStringList pl = full_path.split(":");
|
||||||
for (int i = 0; i < pl.size_s(); ++i) {
|
for (int i = 0; i < pl.size_s(); ++i) {
|
||||||
PIString p(pl[i]);
|
PIString p(pl[i].trimmed());
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0: setPath(p); break;
|
case 0: setPath(p); break;
|
||||||
case 1: setSpeed(p.toInt()); break;
|
case 1: setSpeed(p.toInt()); break;
|
||||||
|
|||||||
Reference in New Issue
Block a user