[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/03: build: moving the location of the co
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/03: build: moving the location of the config.h file in the build tree so we can access it in sources as gnuradio/config.h. |
Date: |
Wed, 26 Feb 2014 16:19:41 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 190faaac44edff4fc3d56c2ede6ec75774cf0d23
Author: Tom Rondeau <address@hidden>
Date: Wed Feb 26 10:04:22 2014 -0500
build: moving the location of the config.h file in the build tree so we can
access it in sources as gnuradio/config.h.
Also uses the config.h to pull out if we've defined GR_PERFORMANCE_COUNTERS
to handle the setup_pc_rpc function if perf counters are/are not compiled in.
---
CMakeLists.txt | 6 +++---
gnuradio-runtime/lib/block.cc | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 785d78b..4e776d8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -325,7 +325,7 @@ configure_file(
${CMAKE_BINARY_DIR}/cmake/Modules/GnuradioConfigVersion.cmake
@ONLY)
-SET(cmake_configs
+SET(cmake_configs
${CMAKE_SOURCE_DIR}/cmake/Modules/GnuradioConfig.cmake
${CMAKE_BINARY_DIR}/cmake/Modules/GnuradioConfigVersion.cmake
)
@@ -360,13 +360,13 @@ message(STATUS "Building for version: ${VERSION} /
${LIBVER}")
# Create a config.h with some definitions to export to other projects.
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
- ${CMAKE_CURRENT_BINARY_DIR}/config.h
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime/include/gnuradio/config.h
)
# Install config.h in include/gnuradio
install(
FILES
- ${CMAKE_CURRENT_BINARY_DIR}/config.h
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime/include/gnuradio/config.h
DESTINATION ${GR_INCLUDE_DIR}/gnuradio
COMPONENT "runtime_devel"
)
diff --git a/gnuradio-runtime/lib/block.cc b/gnuradio-runtime/lib/block.cc
index 169a1b0..7a1364d 100644
--- a/gnuradio-runtime/lib/block.cc
+++ b/gnuradio-runtime/lib/block.cc
@@ -29,6 +29,7 @@
#include <gnuradio/block_detail.h>
#include <gnuradio/buffer.h>
#include <gnuradio/prefs.h>
+#include <gnuradio/config.h>
#include <stdexcept>
#include <iostream>
@@ -736,7 +737,7 @@ namespace gr {
block::setup_pc_rpc()
{
d_pc_rpc_set = true;
-#ifdef GR_CTRLPORT
+#if defined(GR_CTRLPORT) && defined(GR_PERFORMANCE_COUNTERS)
d_rpc_vars.push_back(
rpcbasic_sptr(new rpcbasic_register_get<block, float>(
alias(), "noutput_items", &block::pc_noutput_items,
@@ -848,7 +849,7 @@ namespace gr {
pmt::make_c32vector(0,0), pmt::make_c32vector(0,1),
pmt::make_c32vector(0,0),
"", "Var. of how full output buffers are", RPC_PRIVLVL_MIN,
DISPTIME | DISPOPTSTRIP)));
-#endif /* GR_CTRLPORT */
+#endif /* defined(GR_CTRLPORT) && defined(GR_PERFORMANCE_COUNTERS) */
}
std::ostream&