mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 01:18:38 -05:00
Fix and enable sdrbench build on Windows
This commit is contained in:
parent
305c97fc0e
commit
f8dcbaab66
@ -421,13 +421,7 @@ add_subdirectory(logging)
|
|||||||
add_subdirectory(qrtplib)
|
add_subdirectory(qrtplib)
|
||||||
add_subdirectory(swagger)
|
add_subdirectory(swagger)
|
||||||
add_subdirectory(devices)
|
add_subdirectory(devices)
|
||||||
|
add_subdirectory(sdrbench)
|
||||||
# strange symbol dependency
|
|
||||||
# mainbench.obj : error LNK2001: unresolved external
|
|
||||||
# symbol "public: static float const decimation_scale<12>::scaleIn" (?scaleIn@?$decimation_scale@$0M@@@2MB)
|
|
||||||
if(NOT WIN32)
|
|
||||||
add_subdirectory(sdrbench)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (BUILD_GUI)
|
if (BUILD_GUI)
|
||||||
add_subdirectory(sdrgui)
|
add_subdirectory(sdrgui)
|
||||||
@ -494,21 +488,19 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
############ build sdrangel benchmark ################
|
############ build sdrangel benchmark ################
|
||||||
if(NOT WIN32)
|
set(sdrangelbench_SOURCES
|
||||||
set(sdrangelbench_SOURCES
|
|
||||||
appbench/main.cpp
|
appbench/main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(sdrangelbench
|
add_executable(sdrangelbench
|
||||||
${sdrangelbench_SOURCES}
|
${sdrangelbench_SOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(sdrangelbench
|
target_link_libraries(sdrangelbench
|
||||||
Qt5::Multimedia
|
Qt5::Multimedia
|
||||||
sdrbench
|
sdrbench
|
||||||
logging
|
logging
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
############ build sdrangel gui ################
|
############ build sdrangel gui ################
|
||||||
if (BUILD_GUI)
|
if (BUILD_GUI)
|
||||||
set(sdrangel_SOURCES
|
set(sdrangel_SOURCES
|
||||||
@ -554,9 +546,7 @@ if (BUILD_SERVER)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
############ install ##################
|
############ install ##################
|
||||||
if(NOT WIN32)
|
install(TARGETS sdrangelbench DESTINATION ${INSTALL_BIN_DIR})
|
||||||
install(TARGETS sdrangelbench DESTINATION ${INSTALL_BIN_DIR})
|
|
||||||
endif()
|
|
||||||
if (BUILD_GUI)
|
if (BUILD_GUI)
|
||||||
install(TARGETS ${CMAKE_PROJECT_NAME} DESTINATION ${INSTALL_BIN_DIR})
|
install(TARGETS ${CMAKE_PROJECT_NAME} DESTINATION ${INSTALL_BIN_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
@ -21,20 +21,22 @@
|
|||||||
#include <QSysInfo>
|
#include <QSysInfo>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include <signal.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "loggerwithfile.h"
|
#include "loggerwithfile.h"
|
||||||
#include "mainbench.h"
|
#include "mainbench.h"
|
||||||
#include "dsp/dsptypes.h"
|
#include "dsp/dsptypes.h"
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
|
||||||
|
#include <signal.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
void handler(int sig) {
|
void handler(int sig) {
|
||||||
fprintf(stderr, "quit the application by signal(%d).\n", sig);
|
fprintf(stderr, "quit the application by signal(%d).\n", sig);
|
||||||
QCoreApplication::quit();
|
QCoreApplication::quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
void catchUnixSignals(const std::vector<int>& quitSignals) {
|
void catchUnixSignals(const std::vector<int>& quitSignals) {
|
||||||
sigset_t blocking_mask;
|
sigset_t blocking_mask;
|
||||||
sigemptyset(&blocking_mask);
|
sigemptyset(&blocking_mask);
|
||||||
|
@ -99,7 +99,6 @@ set(sdrbase_SOURCES
|
|||||||
dsp/channelsamplesource.cpp
|
dsp/channelsamplesource.cpp
|
||||||
dsp/cwkeyer.cpp
|
dsp/cwkeyer.cpp
|
||||||
dsp/cwkeyersettings.cpp
|
dsp/cwkeyersettings.cpp
|
||||||
dsp/decimatorsif.cpp
|
|
||||||
dsp/decimatorsff.cpp
|
dsp/decimatorsff.cpp
|
||||||
dsp/decimatorsfi.cpp
|
dsp/decimatorsfi.cpp
|
||||||
dsp/decimatorc.cpp
|
dsp/decimatorc.cpp
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
|
|
||||||
// //
|
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
|
||||||
// it under the terms of the GNU General Public License as published by //
|
|
||||||
// the Free Software Foundation as version 3 of the License, or //
|
|
||||||
// (at your option) any later version. //
|
|
||||||
// //
|
|
||||||
// This program is distributed in the hope that it will be useful, //
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
|
||||||
// GNU General Public License V3 for more details. //
|
|
||||||
// //
|
|
||||||
// You should have received a copy of the GNU General Public License //
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#include "decimatorsif.h"
|
|
||||||
|
|
||||||
const float decimation_scale<8>::scaleIn = 1.0/128.0;
|
|
||||||
const float decimation_scale<12>::scaleIn = 1.0/2048.0;
|
|
||||||
const float decimation_scale<16>::scaleIn = 1.0/32768.0;
|
|
||||||
|
|
@ -26,31 +26,9 @@
|
|||||||
template<uint InputBits>
|
template<uint InputBits>
|
||||||
struct decimation_scale
|
struct decimation_scale
|
||||||
{
|
{
|
||||||
static const float scaleIn;
|
static constexpr float scaleIn = 1.0f / (1 << (InputBits - 1));
|
||||||
};
|
};
|
||||||
|
|
||||||
template<uint InputBits>
|
|
||||||
const float decimation_scale<InputBits>::scaleIn = 1.0;
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct decimation_scale<8>
|
|
||||||
{
|
|
||||||
static const float scaleIn;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct decimation_scale<12>
|
|
||||||
{
|
|
||||||
static const float scaleIn;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct decimation_scale<16>
|
|
||||||
{
|
|
||||||
static const float scaleIn;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template<typename T, uint InputBits, bool IQOrder>
|
template<typename T, uint InputBits, bool IQOrder>
|
||||||
class DecimatorsIF {
|
class DecimatorsIF {
|
||||||
public:
|
public:
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "dsp/decimatorsfi.h"
|
#include "dsp/decimatorsfi.h"
|
||||||
#include "dsp/decimatorsff.h"
|
#include "dsp/decimatorsff.h"
|
||||||
#include "parserbench.h"
|
#include "parserbench.h"
|
||||||
|
#include "export.h"
|
||||||
|
|
||||||
namespace qtwebapp {
|
namespace qtwebapp {
|
||||||
class LoggerWithFile;
|
class LoggerWithFile;
|
||||||
@ -38,8 +39,8 @@ class MainBench: public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainBench(qtwebapp::LoggerWithFile *logger, const ParserBench& parser, QObject *parent = 0);
|
SDRBASE_API explicit MainBench(qtwebapp::LoggerWithFile *logger, const ParserBench& parser, QObject *parent = 0);
|
||||||
~MainBench();
|
SDRBASE_API ~MainBench();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void run();
|
void run();
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "export.h"
|
||||||
|
|
||||||
class ParserBench
|
class ParserBench
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -36,10 +38,10 @@ public:
|
|||||||
TestAMBE
|
TestAMBE
|
||||||
} TestType;
|
} TestType;
|
||||||
|
|
||||||
ParserBench();
|
SDRBASE_API ParserBench();
|
||||||
~ParserBench();
|
SDRBASE_API ~ParserBench();
|
||||||
|
|
||||||
void parse(const QCoreApplication& app);
|
SDRBASE_API void parse(const QCoreApplication& app);
|
||||||
|
|
||||||
const QString& getTestStr() const { return m_testStr; }
|
const QString& getTestStr() const { return m_testStr; }
|
||||||
TestType getTestType() const;
|
TestType getTestType() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user