mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-24 17:08:36 -05:00
Fixes for clang-cl build
This commit is contained in:
parent
b396a190de
commit
74d0c74830
@ -2,9 +2,7 @@ include_guard(GLOBAL)
|
||||
|
||||
include(DetectArchitecture)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/MP)
|
||||
else()
|
||||
if(NOT MSVC)
|
||||
add_compile_options(-Wall -Wextra -Wvla -Woverloaded-virtual -ffast-math -ftree-vectorize)
|
||||
endif()
|
||||
|
||||
|
@ -141,8 +141,12 @@ endif()
|
||||
if (MSVC)
|
||||
# Glue to make ARCH_OPT more flexible for MSVC
|
||||
if (ARCH_OPT STREQUAL "native")
|
||||
detect_msvc_native_opt()
|
||||
FILE(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/tmp)
|
||||
# Some compilers simulating MSVC supports the march flag, so use it if we can
|
||||
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")
|
||||
force_ext_available(SSE4_2)
|
||||
set(ARCH_OPT "")
|
||||
@ -165,7 +169,7 @@ message(STATUS "Target architecture: ${ARCHITECTURE}-${ARCH_OPT}")
|
||||
|
||||
cmake_push_check_state(RESET)
|
||||
if (ARCH_OPT)
|
||||
if(MSVC)
|
||||
if(MSVC AND NOT MARCH_NATIVE_SUPPORTED)
|
||||
set(CMAKE_REQUIRED_FLAGS "/arch:${ARCH_OPT}")
|
||||
add_compile_options(${CMAKE_REQUIRED_FLAGS})
|
||||
else()
|
||||
|
@ -127,4 +127,17 @@
|
||||
# define SWG_API
|
||||
#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 */
|
||||
|
10
external/CMakeLists.txt
vendored
10
external/CMakeLists.txt
vendored
@ -68,7 +68,6 @@ elseif (LINUX)
|
||||
)
|
||||
endif ()
|
||||
|
||||
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_POLICY_DEFAULT_CMP0069:STRING=NEW)
|
||||
if(CMAKE_MSVC_RUNTIME_LIBRARY)
|
||||
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_POLICY_DEFAULT_CMP0091:STRING=NEW)
|
||||
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})
|
||||
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_REQUIRED=${CMAKE_CXX_STANDARD_REQUIRED})
|
||||
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS})
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <QMutex>
|
||||
#include "export.h"
|
||||
|
||||
class OpusEncoder;
|
||||
struct OpusEncoder;
|
||||
|
||||
class SDRBASE_API AudioOpus
|
||||
{
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "export.h"
|
||||
|
||||
class RemoteDataBlock;
|
||||
class Sample;
|
||||
struct Sample;
|
||||
|
||||
class SDRBASE_API RemoteDataReadQueue
|
||||
{
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "decimatorsff.h"
|
||||
|
||||
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;
|
||||
|
||||
@ -33,7 +33,7 @@ void DecimatorsFF<true>::decimate1(FSampleVector::iterator* it, const float* buf
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -29,11 +29,11 @@ class DecimatorsFF
|
||||
{
|
||||
public:
|
||||
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);
|
||||
SDRBASE_API void decimate2_sup(FSampleVector::iterator* it, const float* buf, qint32 nbIAndQ);
|
||||
void decimate2_inf(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);
|
||||
SDRBASE_API 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_inf(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 decimate8_inf(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"
|
||||
|
||||
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;
|
||||
|
||||
@ -33,7 +33,7 @@ void DecimatorsFI<true>::decimate1(SampleVector::iterator* it, const float* buf,
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@ -48,7 +48,7 @@ void DecimatorsFI<false>::decimate1(SampleVector::iterator* it, const float* buf
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@ -69,7 +69,7 @@ void DecimatorsFI<true>::decimate2_inf(SampleVector::iterator* it, const float*
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@ -90,7 +90,7 @@ void DecimatorsFI<false>::decimate2_inf(SampleVector::iterator* it, const float*
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@ -111,7 +111,7 @@ void DecimatorsFI<true>::decimate2_sup(SampleVector::iterator* it, const float*
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@ -132,7 +132,7 @@ void DecimatorsFI<false>::decimate2_sup(SampleVector::iterator* it, const float*
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@ -149,7 +149,7 @@ void DecimatorsFI<true>::decimate4_inf(SampleVector::iterator* it, const float*
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@ -166,7 +166,7 @@ void DecimatorsFI<false>::decimate4_inf(SampleVector::iterator* it, const float*
|
||||
}
|
||||
|
||||
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):
|
||||
// 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<>
|
||||
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):
|
||||
// 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 MessageQueue;
|
||||
class DeviceAPI;
|
||||
class DeviceUserArgs;
|
||||
struct DeviceUserArgs;
|
||||
class WebAPIAdapterInterface;
|
||||
|
||||
class SDRBASE_API PluginManager : public QObject {
|
||||
|
@ -35,12 +35,12 @@ namespace qtwebapp {
|
||||
class LoggerWithFile;
|
||||
}
|
||||
|
||||
class MainBench: public QObject {
|
||||
class SDRBENCH_API MainBench: public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SDRBASE_API explicit MainBench(qtwebapp::LoggerWithFile *logger, const ParserBench& parser, QObject *parent = 0);
|
||||
SDRBASE_API ~MainBench();
|
||||
explicit MainBench(qtwebapp::LoggerWithFile *logger, const ParserBench& parser, QObject *parent = 0);
|
||||
~MainBench();
|
||||
|
||||
public slots:
|
||||
void run();
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "export.h"
|
||||
|
||||
class ParserBench
|
||||
class SDRBENCH_API ParserBench
|
||||
{
|
||||
public:
|
||||
typedef enum
|
||||
@ -38,10 +38,10 @@ public:
|
||||
TestAMBE
|
||||
} TestType;
|
||||
|
||||
SDRBASE_API ParserBench();
|
||||
SDRBASE_API ~ParserBench();
|
||||
ParserBench();
|
||||
~ParserBench();
|
||||
|
||||
SDRBASE_API void parse(const QCoreApplication& app);
|
||||
void parse(const QCoreApplication& app);
|
||||
|
||||
const QString& getTestStr() const { return m_testStr; }
|
||||
TestType getTestType() const;
|
||||
|
Loading…
Reference in New Issue
Block a user