From d88328072d5ecd0c3c5aef05b705e2b4a1425d9f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 21 Mar 2012 16:59:12 -0700 Subject: volk: add include for config.h to cc file volk_32f_s32f_convert_16i_a was also a problem, previously volk_32f_s32f_convert_16i_u was fixed to have config.h. I heard putting config h stuff into public headers was bad practice. Including config.h into the generated cc file should fix this issue from now on. --- volk/gen/make_each_machine_c.py | 4 ++++ volk/include/volk/volk_32f_s32f_convert_16i_a.h | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/volk/gen/make_each_machine_c.py b/volk/gen/make_each_machine_c.py index 44e2ef3f2..a3f6203ba 100644 --- a/volk/gen/make_each_machine_c.py +++ b/volk/gen/make_each_machine_c.py @@ -65,6 +65,10 @@ def make_each_machine_c(machine_name, archs, functions, fcountlist, taglist, ali #include "volk_machines.h" #include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + """ for func in functions: tempstring += "#include \n" diff --git a/volk/include/volk/volk_32f_s32f_convert_16i_a.h b/volk/include/volk/volk_32f_s32f_convert_16i_a.h index c2a07398f..a24959678 100644 --- a/volk/include/volk/volk_32f_s32f_convert_16i_a.h +++ b/volk/include/volk/volk_32f_s32f_convert_16i_a.h @@ -1,10 +1,6 @@ #ifndef INCLUDED_volk_32f_s32f_convert_16i_a_H #define INCLUDED_volk_32f_s32f_convert_16i_a_H -#ifdef HAVE_CONFIG_H -#include -#endif - #include #include #include -- cgit From d9226e09495586279a06ec0e0af41e8ac6990970 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 22 Mar 2012 12:38:20 -0700 Subject: volk: fix for load prefs (config path) 1) add APPDATA to search path for windows 2) graceful fail and env vars not defined --- volk/lib/volk_prefs.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/volk/lib/volk_prefs.c b/volk/lib/volk_prefs.c index b29d5fd87..7e705bed4 100644 --- a/volk/lib/volk_prefs.c +++ b/volk/lib/volk_prefs.c @@ -9,7 +9,14 @@ void get_config_path(char *path) { const char *suffix = "/.volk/volk_config"; - strcpy(path, getenv("HOME")); + char *home = NULL; + if (home == NULL) home = getenv("HOME"); + if (home == NULL) home = getenv("APPDATA"); + if (home == NULL){ + path = NULL; + return; + } + strcpy(path, home); strcat(path, suffix); } @@ -22,6 +29,7 @@ int load_preferences(struct volk_arch_pref **prefs) { //get the config path get_config_path(path); + if (path == NULL) return n_arch_prefs; //no prefs found config_file = fopen(path, "r"); if(!config_file) return n_arch_prefs; //no prefs found -- cgit From 116f82343080091df0c3c7efb61c202cadf30f3b Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 22 Mar 2012 13:46:20 -0700 Subject: volk: added volk as depedency for various components Its important to list the dependent libraries for a test so the library path can be correctly set. This is necessary on platforms without dynamic re-linking. --- gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt | 4 ++-- gnuradio-core/src/tests/CMakeLists.txt | 4 ++-- gr-atsc/src/lib/CMakeLists.txt | 4 ++-- gr-atsc/src/python/CMakeLists.txt | 4 ++-- gr-digital/python/CMakeLists.txt | 4 ++-- gr-pager/python/CMakeLists.txt | 4 ++-- gr-qtgui/python/CMakeLists.txt | 4 ++-- gr-trellis/src/python/CMakeLists.txt | 4 ++-- gr-video-sdl/src/CMakeLists.txt | 4 ++-- gr-vocoder/python/CMakeLists.txt | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt index 912927921..3e75ead03 100644 --- a/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt +++ b/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2011 Free Software Foundation, Inc. +# Copyright 2010-2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -46,7 +46,7 @@ foreach(py_qa_test_file ${py_qa_test_files}) ${CMAKE_BINARY_DIR}/gnuradio-core/src/python ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig ) - set(GR_TEST_TARGET_DEPS gruel gnuradio-core) + set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING) diff --git a/gnuradio-core/src/tests/CMakeLists.txt b/gnuradio-core/src/tests/CMakeLists.txt index 6de259116..34ad36568 100644 --- a/gnuradio-core/src/tests/CMakeLists.txt +++ b/gnuradio-core/src/tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2011 Free Software Foundation, Inc. +# Copyright 2010-2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -63,7 +63,7 @@ endforeach(test_not_run_src) # Set the test environment so the build libs will be found under MSVC. ######################################################################## include(GrTest) -set(GR_TEST_TARGET_DEPS gruel gnuradio-core test-gnuradio-core) +set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core test-gnuradio-core) add_executable(gr_core_test_all test_all.cc) target_link_libraries(gr_core_test_all test-gnuradio-core) GR_ADD_TEST(gr-core-test-all gr_core_test_all) diff --git a/gr-atsc/src/lib/CMakeLists.txt b/gr-atsc/src/lib/CMakeLists.txt index d3d98b81d..dc51f0c90 100644 --- a/gr-atsc/src/lib/CMakeLists.txt +++ b/gr-atsc/src/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2011 Free Software Foundation, Inc. +# Copyright 2011-212 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -129,7 +129,7 @@ list(APPEND test_atsci_sources ) include(GrTest) -set(GR_TEST_TARGET_DEPS gnuradio-atsc gnuradio-core gruel) +set(GR_TEST_TARGET_DEPS gnuradio-atsc gnuradio-core gruel volk) add_executable(test_atsci ${test_atsci_sources} test_atsci.cc) target_link_libraries(test_atsci gnuradio-atsc gnuradio-core ${CPPUNIT_LIBRARIES}) GR_ADD_TEST(atsci-test test_atsci) diff --git a/gr-atsc/src/python/CMakeLists.txt b/gr-atsc/src/python/CMakeLists.txt index aca15c572..4c2442ba0 100644 --- a/gr-atsc/src/python/CMakeLists.txt +++ b/gr-atsc/src/python/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2011 Free Software Foundation, Inc. +# Copyright 2011-2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -52,7 +52,7 @@ foreach(py_qa_test_file ${py_qa_test_files}) ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig ${CMAKE_BINARY_DIR}/gr-atsc/src/lib ) - set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-atsc) + set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core gnuradio-atsc) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING) diff --git a/gr-digital/python/CMakeLists.txt b/gr-digital/python/CMakeLists.txt index 905626b8b..c786b5a14 100644 --- a/gr-digital/python/CMakeLists.txt +++ b/gr-digital/python/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2011 Free Software Foundation, Inc. +# Copyright 2011-212 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -71,7 +71,7 @@ foreach(py_qa_test_file ${py_qa_test_files}) ${CMAKE_BINARY_DIR}/gr-digital/python ${CMAKE_BINARY_DIR}/gr-digital/swig ) - set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-digital) + set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core gnuradio-digital) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING) diff --git a/gr-pager/python/CMakeLists.txt b/gr-pager/python/CMakeLists.txt index bbbf35a71..08915aa00 100644 --- a/gr-pager/python/CMakeLists.txt +++ b/gr-pager/python/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2011 Free Software Foundation, Inc. +# Copyright 2011-2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -43,7 +43,7 @@ foreach(py_qa_test_file ${py_qa_test_files}) ${CMAKE_BINARY_DIR}/gr-pager/python ${CMAKE_BINARY_DIR}/gr-pager/swig ) - set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-pager) + set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core gnuradio-pager) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING) diff --git a/gr-qtgui/python/CMakeLists.txt b/gr-qtgui/python/CMakeLists.txt index e61b54f08..e3fd602ef 100644 --- a/gr-qtgui/python/CMakeLists.txt +++ b/gr-qtgui/python/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2011 Free Software Foundation, Inc. +# Copyright 2010-2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -40,7 +40,7 @@ foreach(py_qa_test_file ${py_qa_test_files}) ${CMAKE_BINARY_DIR}/gr-qtgui/python ${CMAKE_BINARY_DIR}/gr-qtgui/swig ) - set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-qtgui) + set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core gnuradio-qtgui) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING) diff --git a/gr-trellis/src/python/CMakeLists.txt b/gr-trellis/src/python/CMakeLists.txt index 9a9cc6aed..66ca3eb13 100644 --- a/gr-trellis/src/python/CMakeLists.txt +++ b/gr-trellis/src/python/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2011 Free Software Foundation, Inc. +# Copyright 2011-2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -31,7 +31,7 @@ foreach(py_qa_test_file ${py_qa_test_files}) ${CMAKE_BINARY_DIR}/gr-digital/swig ${CMAKE_BINARY_DIR}/gr-trellis/src/lib ) - set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-digital gnuradio-trellis) + set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core gnuradio-digital gnuradio-trellis) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING) diff --git a/gr-video-sdl/src/CMakeLists.txt b/gr-video-sdl/src/CMakeLists.txt index 3bfe9bb62..0c2069112 100644 --- a/gr-video-sdl/src/CMakeLists.txt +++ b/gr-video-sdl/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2011 Free Software Foundation, Inc. +# Copyright 2011-2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -106,7 +106,7 @@ foreach(py_qa_test_file ${py_qa_test_files}) ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig ${CMAKE_BINARY_DIR}/gr-video-sdl/src ) - set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-video-sdl) + set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core gnuradio-video-sdl) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING AND ENABLE_PYTHON) diff --git a/gr-vocoder/python/CMakeLists.txt b/gr-vocoder/python/CMakeLists.txt index fff3fffbd..ee3765d5e 100644 --- a/gr-vocoder/python/CMakeLists.txt +++ b/gr-vocoder/python/CMakeLists.txt @@ -44,7 +44,7 @@ foreach(py_qa_test_file ${py_qa_test_files}) ${CMAKE_BINARY_DIR}/gr-vocoder/python ${CMAKE_BINARY_DIR}/gr-vocoder/swig ) - set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-vocoder) + set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core gnuradio-vocoder) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING) -- cgit