kopia lustrzana https://github.com/f4exb/sdrangel
Fixes for clang-cl build
rodzic
b396a190de
commit
74d0c74830
|
@ -2,9 +2,7 @@ include_guard(GLOBAL)
|
||||||
|
|
||||||
include(DetectArchitecture)
|
include(DetectArchitecture)
|
||||||
|
|
||||||
if(MSVC)
|
if(NOT MSVC)
|
||||||
add_compile_options(/MP)
|
|
||||||
else()
|
|
||||||
add_compile_options(-Wall -Wextra -Wvla -Woverloaded-virtual -ffast-math -ftree-vectorize)
|
add_compile_options(-Wall -Wextra -Wvla -Woverloaded-virtual -ffast-math -ftree-vectorize)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -141,8 +141,12 @@ endif()
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# Glue to make ARCH_OPT more flexible for MSVC
|
# Glue to make ARCH_OPT more flexible for MSVC
|
||||||
if (ARCH_OPT STREQUAL "native")
|
if (ARCH_OPT STREQUAL "native")
|
||||||
detect_msvc_native_opt()
|
# Some compilers simulating MSVC supports the march flag, so use it if we can
|
||||||
FILE(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/tmp)
|
check_cxx_compiler_flag("-march=native" MARCH_NATIVE_SUPPORTED)
|
||||||
|
if (NOT MARCH_NATIVE_SUPPORTED)
|
||||||
|
detect_msvc_native_opt()
|
||||||
|
FILE(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/tmp)
|
||||||
|
endif()
|
||||||
elseif(ARCH_OPT STREQUAL "SSE4_2")
|
elseif(ARCH_OPT STREQUAL "SSE4_2")
|
||||||
force_ext_available(SSE4_2)
|
force_ext_available(SSE4_2)
|
||||||
set(ARCH_OPT "")
|
set(ARCH_OPT "")
|
||||||
|
@ -165,7 +169,7 @@ message(STATUS "Target architecture: ${ARCHITECTURE}-${ARCH_OPT}")
|
||||||
|
|
||||||
cmake_push_check_state(RESET)
|
cmake_push_check_state(RESET)
|
||||||
if (ARCH_OPT)
|
if (ARCH_OPT)
|
||||||
if(MSVC)
|
if(MSVC AND NOT MARCH_NATIVE_SUPPORTED)
|
||||||
set(CMAKE_REQUIRED_FLAGS "/arch:${ARCH_OPT}")
|
set(CMAKE_REQUIRED_FLAGS "/arch:${ARCH_OPT}")
|
||||||
add_compile_options(${CMAKE_REQUIRED_FLAGS})
|
add_compile_options(${CMAKE_REQUIRED_FLAGS})
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -127,4 +127,17 @@
|
||||||
# define SWG_API
|
# define SWG_API
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* the 'SDRBENCH_API' controls the import/export of 'sdrbench' symbols
|
||||||
|
*/
|
||||||
|
#if !defined(sdrangel_STATIC)
|
||||||
|
# ifdef sdrbench_EXPORTS
|
||||||
|
# define SDRBENCH_API __SDR_EXPORT
|
||||||
|
# else
|
||||||
|
# define SDRBENCH_API __SDR_IMPORT
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define SDRBENCH_API
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* __SDRANGEL_EXPORT_H */
|
#endif /* __SDRANGEL_EXPORT_H */
|
||||||
|
|
|
@ -68,7 +68,6 @@ elseif (LINUX)
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_POLICY_DEFAULT_CMP0069:STRING=NEW)
|
|
||||||
if(CMAKE_MSVC_RUNTIME_LIBRARY)
|
if(CMAKE_MSVC_RUNTIME_LIBRARY)
|
||||||
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_POLICY_DEFAULT_CMP0091:STRING=NEW)
|
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_POLICY_DEFAULT_CMP0091:STRING=NEW)
|
||||||
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_MSVC_RUNTIME_LIBRARY=${CMAKE_MSVC_RUNTIME_LIBRARY})
|
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_MSVC_RUNTIME_LIBRARY=${CMAKE_MSVC_RUNTIME_LIBRARY})
|
||||||
|
@ -78,6 +77,15 @@ if(CMAKE_BUILD_TYPE)
|
||||||
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
|
||||||
|
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
|
||||||
|
if (CMAKE_LINKER)
|
||||||
|
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_LINKER=${CMAKE_LINKER})
|
||||||
|
endif()
|
||||||
|
if (CMAKE_AR)
|
||||||
|
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_AR=${CMAKE_AR})
|
||||||
|
endif()
|
||||||
|
|
||||||
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD})
|
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD})
|
||||||
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_STANDARD_REQUIRED=${CMAKE_CXX_STANDARD_REQUIRED})
|
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_STANDARD_REQUIRED=${CMAKE_CXX_STANDARD_REQUIRED})
|
||||||
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS})
|
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS})
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include "export.h"
|
#include "export.h"
|
||||||
|
|
||||||
class OpusEncoder;
|
struct OpusEncoder;
|
||||||
|
|
||||||
class SDRBASE_API AudioOpus
|
class SDRBASE_API AudioOpus
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "export.h"
|
#include "export.h"
|
||||||
|
|
||||||
class RemoteDataBlock;
|
class RemoteDataBlock;
|
||||||
class Sample;
|
struct Sample;
|
||||||
|
|
||||||
class SDRBASE_API RemoteDataReadQueue
|
class SDRBASE_API RemoteDataReadQueue
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "decimatorsff.h"
|
#include "decimatorsff.h"
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFF<true>::decimate1(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFF<true>::decimate1(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
float xreal, yimag;
|
float xreal, yimag;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ void DecimatorsFF<true>::decimate1(FSampleVector::iterator* it, const float* buf
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFF<false>::decimate1(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFF<false>::decimate1(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
float xreal, yimag;
|
float xreal, yimag;
|
||||||
|
|
||||||
|
|
|
@ -29,11 +29,11 @@ class DecimatorsFF
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SDRBASE_API void decimate1(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
SDRBASE_API void decimate1(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
||||||
SDRBASE_API void decimate2_inf(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
void decimate2_inf(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
||||||
SDRBASE_API void decimate2_sup(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
void decimate2_sup(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
||||||
void decimate2_cen(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
void decimate2_cen(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
||||||
SDRBASE_API void decimate4_inf(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
void decimate4_inf(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
||||||
SDRBASE_API void decimate4_sup(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
void decimate4_sup(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
||||||
void decimate4_cen(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
void decimate4_cen(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
||||||
void decimate8_inf(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
void decimate8_inf(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
||||||
void decimate8_sup(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
void decimate8_sup(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "decimatorsfi.h"
|
#include "decimatorsfi.h"
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFI<true>::decimate1(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFI<true>::decimate1(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
float xreal, yimag;
|
float xreal, yimag;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ void DecimatorsFI<true>::decimate1(SampleVector::iterator* it, const float* buf,
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFI<false>::decimate1(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFI<false>::decimate1(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
float xreal, yimag;
|
float xreal, yimag;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ void DecimatorsFI<false>::decimate1(SampleVector::iterator* it, const float* buf
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFI<true>::decimate2_inf(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFI<true>::decimate2_inf(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
float xreal, yimag;
|
float xreal, yimag;
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ void DecimatorsFI<true>::decimate2_inf(SampleVector::iterator* it, const float*
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFI<false>::decimate2_inf(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFI<false>::decimate2_inf(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
float xreal, yimag;
|
float xreal, yimag;
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ void DecimatorsFI<false>::decimate2_inf(SampleVector::iterator* it, const float*
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFI<true>::decimate2_sup(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFI<true>::decimate2_sup(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
float xreal, yimag;
|
float xreal, yimag;
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ void DecimatorsFI<true>::decimate2_sup(SampleVector::iterator* it, const float*
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFI<false>::decimate2_sup(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFI<false>::decimate2_sup(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
float xreal, yimag;
|
float xreal, yimag;
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ void DecimatorsFI<false>::decimate2_sup(SampleVector::iterator* it, const float*
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFI<true>::decimate4_inf(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFI<true>::decimate4_inf(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
float xreal, yimag;
|
float xreal, yimag;
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ void DecimatorsFI<true>::decimate4_inf(SampleVector::iterator* it, const float*
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFI<false>::decimate4_inf(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFI<false>::decimate4_inf(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
float xreal, yimag;
|
float xreal, yimag;
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ void DecimatorsFI<false>::decimate4_inf(SampleVector::iterator* it, const float*
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFI<true>::decimate4_sup(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFI<true>::decimate4_sup(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
// Sup (USB):
|
// Sup (USB):
|
||||||
// x y x y x y x y / x -> 1,-2,-5,6 / y -> -0,-3,4,7
|
// x y x y x y x y / x -> 1,-2,-5,6 / y -> -0,-3,4,7
|
||||||
|
@ -189,7 +189,7 @@ void DecimatorsFI<true>::decimate4_sup(SampleVector::iterator* it, const float*
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void DecimatorsFI<false>::decimate4_sup(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
SDRBASE_API void DecimatorsFI<false>::decimate4_sup(SampleVector::iterator* it, const float* buf, qint32 nbIAndQ)
|
||||||
{
|
{
|
||||||
// Sup (USB):
|
// Sup (USB):
|
||||||
// x y x y x y x y / x -> 1,-2,-5,6 / y -> -0,-3,4,7
|
// x y x y x y x y / x -> 1,-2,-5,6 / y -> -0,-3,4,7
|
||||||
|
|
|
@ -33,7 +33,7 @@ class QPluginLoader;
|
||||||
class Message;
|
class Message;
|
||||||
class MessageQueue;
|
class MessageQueue;
|
||||||
class DeviceAPI;
|
class DeviceAPI;
|
||||||
class DeviceUserArgs;
|
struct DeviceUserArgs;
|
||||||
class WebAPIAdapterInterface;
|
class WebAPIAdapterInterface;
|
||||||
|
|
||||||
class SDRBASE_API PluginManager : public QObject {
|
class SDRBASE_API PluginManager : public QObject {
|
||||||
|
|
|
@ -35,12 +35,12 @@ namespace qtwebapp {
|
||||||
class LoggerWithFile;
|
class LoggerWithFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MainBench: public QObject {
|
class SDRBENCH_API MainBench: public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SDRBASE_API explicit MainBench(qtwebapp::LoggerWithFile *logger, const ParserBench& parser, QObject *parent = 0);
|
explicit MainBench(qtwebapp::LoggerWithFile *logger, const ParserBench& parser, QObject *parent = 0);
|
||||||
SDRBASE_API ~MainBench();
|
~MainBench();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void run();
|
void run();
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "export.h"
|
#include "export.h"
|
||||||
|
|
||||||
class ParserBench
|
class SDRBENCH_API ParserBench
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -38,10 +38,10 @@ public:
|
||||||
TestAMBE
|
TestAMBE
|
||||||
} TestType;
|
} TestType;
|
||||||
|
|
||||||
SDRBASE_API ParserBench();
|
ParserBench();
|
||||||
SDRBASE_API ~ParserBench();
|
~ParserBench();
|
||||||
|
|
||||||
SDRBASE_API void parse(const QCoreApplication& app);
|
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;
|
||||||
|
|
Ładowanie…
Reference in New Issue