summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-02-21 20:03:26 -0500
committerTom Rondeau <trondeau@vt.edu>2013-02-21 20:03:26 -0500
commita1382a5f28e7a54577825adfbb27f8da89673c2e (patch)
tree6b2817a1799c5d66c484acbdc1c2dd61a522b5b0
parentfadf129a6411255b7474fa0295c486e446da434e (diff)
parentbf00afbbd1c5e4b6913d4f0d3437fbb281e5fe8f (diff)
Merge branch 'next' of gnuradio.org:gnuradio into next
-rw-r--r--cmake/Modules/GrBoost.cmake2
-rw-r--r--gnuradio-core/src/lib/general/gr_random_pdu.cc8
-rw-r--r--gr-channels/lib/sincostable.h1
-rw-r--r--volk/CMakeLists.txt12
-rw-r--r--volk/apps/volk_profile.cc6
5 files changed, 24 insertions, 5 deletions
diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake
index 38cb027f8c..01378df662 100644
--- a/cmake/Modules/GrBoost.cmake
+++ b/cmake/Modules/GrBoost.cmake
@@ -39,6 +39,8 @@ if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
if(MSVC)
+ set(BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS} chrono)
+
if (NOT DEFINED BOOST_ALL_DYN_LINK)
set(BOOST_ALL_DYN_LINK TRUE)
endif()
diff --git a/gnuradio-core/src/lib/general/gr_random_pdu.cc b/gnuradio-core/src/lib/general/gr_random_pdu.cc
index 61332c0715..746f8944a2 100644
--- a/gnuradio-core/src/lib/general/gr_random_pdu.cc
+++ b/gnuradio-core/src/lib/general/gr_random_pdu.cc
@@ -34,6 +34,7 @@
#include <stdexcept>
#include <string.h>
#include <iostream>
+#include <vector>
// public constructor that returns a shared_ptr
@@ -68,14 +69,15 @@ void gr_random_pdu::output_random(){
int len = rvar();
// fill it with random bytes
- unsigned char vec[len];
+ std::vector<unsigned char> vec;
for(int i=0; i<len; i++){
- vec[i] = (unsigned char) bvar();
+ vec.push_back((unsigned char) bvar());
}
// send the vector
- pmt::pmt_t vecpmt( pmt::make_blob( vec, len ) );
+ pmt::pmt_t vecpmt( pmt::make_blob( &vec[0], len ) );
pmt::pmt_t pdu( pmt::cons( pmt::PMT_NIL, vecpmt ) );
+
message_port_pub( pmt::mp("pdus"), pdu );
std::cout << "sending new random vector of length " << len << "\n";
diff --git a/gr-channels/lib/sincostable.h b/gr-channels/lib/sincostable.h
index ca4bc4688b..be5e6a482c 100644
--- a/gr-channels/lib/sincostable.h
+++ b/gr-channels/lib/sincostable.h
@@ -1,6 +1,7 @@
#ifndef SINCOSTABLE_H
#define SINCOSTABLE_H
+#define _USE_MATH_DEFINES
#include <math.h>
class sincostable {
diff --git a/volk/CMakeLists.txt b/volk/CMakeLists.txt
index 0182833382..506c828c17 100644
--- a/volk/CMakeLists.txt
+++ b/volk/CMakeLists.txt
@@ -62,6 +62,18 @@ if(NOT CHEETAH_FOUND)
message(FATAL_ERROR "Cheetah templates required to build VOLK")
endif()
+if(MSVC)
+ if (NOT DEFINED BOOST_ALL_DYN_LINK)
+ set(BOOST_ALL_DYN_LINK TRUE)
+ endif()
+ set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
+ if(BOOST_ALL_DYN_LINK)
+ add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
+ else(BOOST_ALL_DYN_LINK)
+ unset(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
+ endif(BOOST_ALL_DYN_LINK)
+endif(MSVC)
+
set(Boost_ADDITIONAL_VERSIONS
"1.35.0" "1.35" "1.36.0" "1.36" "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39"
"1.40.0" "1.40" "1.41.0" "1.41" "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44"
diff --git a/volk/apps/volk_profile.cc b/volk/apps/volk_profile.cc
index 3b1ab370d3..33bfd4bfab 100644
--- a/volk/apps/volk_profile.cc
+++ b/volk/apps/volk_profile.cc
@@ -1,8 +1,9 @@
#include "qa_utils.h"
-extern "C" {
+
#include <volk/volk.h>
#include <volk/volk_prefs.h>
-}
+
+#include <ciso646>
#include <vector>
#include <boost/foreach.hpp>
#include <boost/filesystem.hpp>
@@ -111,6 +112,7 @@ int main(int argc, char *argv[]) {
char path[1024];
volk_get_config_path(path);
+
const fs::path config_path(path);
if (not fs::exists(config_path.branch_path()))