1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00

Merge branch 'volk-msvc' into next

This commit is contained in:
Carles Fernandez 2019-11-26 08:11:40 +01:00
commit 4ecaeb544b
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
11 changed files with 20 additions and 8 deletions

3
.gitignore vendored
View File

@ -14,3 +14,6 @@ cmake-build-debug/
/install /install
.DS_Store .DS_Store
.pydevproject .pydevproject
.vscode/
.vs/
Testing/

View File

@ -140,6 +140,9 @@ endif()
if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11")) if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11"))
set(CMAKE_REQUIRED_FLAGS "-std=c++17") set(CMAKE_REQUIRED_FLAGS "-std=c++17")
endif() endif()
if(MSVC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "18"))
set(CMAKE_REQUIRED_FLAGS "/std:c++17")
endif()
# Normalize and check the component list we were given # Normalize and check the component list we were given
set(want_components ${FILESYSTEM_FIND_COMPONENTS}) set(want_components ${FILESYSTEM_FIND_COMPONENTS})

View File

@ -49,6 +49,7 @@
- Fixed building in some ARM-based devices. Now Clang and ARMClang can be used for native building. - Fixed building in some ARM-based devices. Now Clang and ARMClang can be used for native building.
- Added toolchain files for building gnss-sdr and the volk_gnsssdr library in several ARM processor architectures, including those in Raspberry Pi 3 and 4. - Added toolchain files for building gnss-sdr and the volk_gnsssdr library in several ARM processor architectures, including those in Raspberry Pi 3 and 4.
- The software can now be built using Xcode (passing -GXcode to CMake) without previous manual installation of volk_gnsssdr. - The software can now be built using Xcode (passing -GXcode to CMake) without previous manual installation of volk_gnsssdr.
- Now the volk_gnsssdr library can be built on Microsoft Windows.
### Improvements in Reliability: ### Improvements in Reliability:

View File

@ -27,7 +27,6 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#include <cstdbool> // for bool
#include <iosfwd> // for ofstream #include <iosfwd> // for ofstream
#include <string> // for string #include <string> // for string
#include <vector> // for vector #include <vector> // for vector

View File

@ -139,6 +139,9 @@ endif()
if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11")) if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11"))
set(CMAKE_REQUIRED_FLAGS "-std=c++17") set(CMAKE_REQUIRED_FLAGS "-std=c++17")
endif() endif()
if(MSVC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "18"))
set(CMAKE_REQUIRED_FLAGS "/std:c++17")
endif()
# Normalize and check the component list we were given # Normalize and check the component list we were given
set(want_components ${FILESYSTEM_FIND_COMPONENTS}) set(want_components ${FILESYSTEM_FIND_COMPONENTS})

View File

@ -45,6 +45,9 @@
#ifdef __cplusplus #ifdef __cplusplus
#ifdef _MSC_VER
#include <complex.h>
#endif
#include <complex> #include <complex>
#include <stdint.h> #include <stdint.h>

View File

@ -103,7 +103,7 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_g
} }
tmp32_1 = *in_common++ * (*phase); tmp32_1 = *in_common++ * (*phase);
phase_doppler *= phase_inc; phase_doppler *= phase_inc;
phase_doppler_rate = cpowf(phase_inc_rate, lv_cmake(n * n, 0.0f)); phase_doppler_rate = cpowf(phase_inc_rate, lv_cmake((float)(n * n), 0.0f));
phase_doppler_rate /= hypotf(lv_creal(phase_doppler_rate), lv_cimag(phase_doppler_rate)); phase_doppler_rate /= hypotf(lv_creal(phase_doppler_rate), lv_cimag(phase_doppler_rate));
(*phase) = phase_doppler * phase_doppler_rate; (*phase) = phase_doppler * phase_doppler_rate;

View File

@ -80,7 +80,7 @@ if(HAVE_POSIX_MEMALIGN)
add_definitions(-DHAVE_POSIX_MEMALIGN) add_definitions(-DHAVE_POSIX_MEMALIGN)
endif() endif()
if(NOT DEFINED _XOPEN_SOURCE) if(NOT DEFINED _XOPEN_SOURCE AND NOT MSVC)
add_definitions(-D_XOPEN_SOURCE=700) add_definitions(-D_XOPEN_SOURCE=700)
endif() endif()
@ -213,7 +213,7 @@ if(CPU_IS_x86)
endif() endif()
# Disable SSE4a if Clang is less than version 3.2 # Disable SSE4a if Clang is less than version 3.2
if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") if(CMAKE_C_COMPILER_ID MATCHES "Clang")
# Figure out the version of Clang # Figure out the version of Clang
if(CMAKE_VERSION VERSION_LESS "2.8.10") if(CMAKE_VERSION VERSION_LESS "2.8.10")
# Extract the Clang version from the --version string. # Extract the Clang version from the --version string.
@ -564,7 +564,8 @@ list(APPEND volk_gnsssdr_sources
set_source_files_properties( set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr.c ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr.c
${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_machines.c ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_machines.c
PROPERTIES COMPILE_DEFINITIONS "${machine_defs}") PROPERTIES COMPILE_DEFINITIONS "${machine_defs}"
)
if(MSVC) if(MSVC)
#add compatibility includes for stdint types #add compatibility includes for stdint types

View File

@ -25,7 +25,6 @@
#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_func_desc_t #include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_func_desc_t
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t #include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
#include <cstdbool> // for bool, false
#include <cstdlib> // for NULL #include <cstdlib> // for NULL
#include <map> // for map #include <map> // for map
#include <string> // for string, basic_string #include <string> // for string, basic_string

View File

@ -21,7 +21,6 @@
#include "kernel_tests.h" // for init_test_list #include "kernel_tests.h" // for init_test_list
#include "qa_utils.h" // for volk_gnsssdr_test_case_t, volk_gnsssdr_test_results_t #include "qa_utils.h" // for volk_gnsssdr_test_case_t, volk_gnsssdr_test_results_t
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t #include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
#include <cstdbool> // for bool, false, true
#include <fstream> // IWYU pragma: keep #include <fstream> // IWYU pragma: keep
#include <iostream> // for operator<<, basic_ostream, endl, char... #include <iostream> // for operator<<, basic_ostream, endl, char...
#include <map> // for map, map<>::iterator, _Rb_tree_iterator #include <map> // for map, map<>::iterator, _Rb_tree_iterator

View File

@ -59,6 +59,7 @@ static inline unsigned long long _xgetbv(unsigned int index)
#elif defined(_MSC_VER) && defined(HAVE_INTRIN_H) #elif defined(_MSC_VER) && defined(HAVE_INTRIN_H)
#include <intrin.h> #include <intrin.h>
#define cpuid_x86(op, r) __cpuid(((int *)r), op) #define cpuid_x86(op, r) __cpuid(((int *)r), op)
#define cpuid_x86_count(op, count, regs) __cpuidex((int *)regs, op, count)
#if defined(_XCR_XFEATURE_ENABLED_MASK) #if defined(_XCR_XFEATURE_ENABLED_MASK)
#define __xgetbv() _xgetbv(_XCR_XFEATURE_ENABLED_MASK) #define __xgetbv() _xgetbv(_XCR_XFEATURE_ENABLED_MASK)