Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readapting the project from GNU Radio 3.8 to 3.10 #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 36 additions & 51 deletions gr-tempest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
# Copyright 2011,2012,2014,2016,2018 Free Software Foundation, Inc.
# # This file was generated by gr_modtool, a tool from the GNU Radio framework # This file is a part of gr-tempest
# Copyright 2011-2020 Free Software Foundation, Inc.
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# This file was generated by gr_modtool, a tool from the GNU Radio framework
# This file is a part of gr-tempest
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# SPDX-License-Identifier: GPL-3.0-or-later
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.

########################################################################
# Project setup
Expand All @@ -38,52 +28,35 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")

# Make sure our local CMake Modules path comes first
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
# Find gnuradio to get access to the cmake modules
find_package(Gnuradio "3.10" REQUIRED COMPONENTS blocks fft filter volk)

# Set the version information here
set(VERSION_MAJOR 1)
set(VERSION_API 0)
set(VERSION_ABI 0)
set(VERSION_PATCH git)
set(VERSION_PATCH 0)

cmake_policy(SET CMP0011 NEW)

# Enable generation of compile_commands.json for code completion engines
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

########################################################################
# Compiler specific setup
# Minimum Version Requirements
########################################################################

include(GrMinReq)

########################################################################
# Compiler settings
########################################################################
if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
AND NOT WIN32)
#http://gcc.gnu.org/wiki/Visibility
add_definitions(-fvisibility=hidden)
endif()

IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
SET(CMAKE_CXX_STANDARD 11)
ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(CMAKE_CXX_STANDARD 11)
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
SET(CMAKE_CXX_STANDARD 11)
ELSE()
message(WARNING "C++ standard could not be set because compiler is not GNU, Clang or MSVC.")
ENDIF()

IF(CMAKE_C_COMPILER_ID STREQUAL "GNU")
SET(CMAKE_C_STANDARD 11)
ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Clang")
SET(CMAKE_C_STANDARD 11)
ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
SET(CMAKE_C_STANDARD 11)
ELSE()
message(WARNING "C standard could not be set because compiler is not GNU, Clang or MSVC.")
ENDIF()
include(GrCompilerSettings)

########################################################################
# Install directories
########################################################################
find_package(Gnuradio "3.8" REQUIRED COMPONENTS blocks fft filter volk)
include(GrVersion)

include(GrPlatform) #define LIB_SUFFIX
Expand All @@ -92,8 +65,8 @@ if(NOT CMAKE_MODULES_DIR)
set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake)
endif(NOT CMAKE_MODULES_DIR)

set(GR_INCLUDE_DIR include/tempest)
set(GR_CMAKE_DIR ${CMAKE_MODULES_DIR}/tempest)
set(GR_INCLUDE_DIR include/gnuradio/tempest)
set(GR_CMAKE_DIR ${CMAKE_MODULES_DIR}/gnuradio-tempest)
set(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME})
set(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME})
set(GR_PKG_CONF_DIR ${GR_CONF_DIR}/${CMAKE_PROJECT_NAME}/conf.d)
Expand Down Expand Up @@ -145,22 +118,34 @@ add_custom_target(uninstall
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
)


########################################################################
# Add subdirectories
########################################################################
add_subdirectory(include/tempest)
add_subdirectory(include/gnuradio/tempest)
add_subdirectory(lib)
add_subdirectory(apps)
add_subdirectory(docs)
add_subdirectory(swig)
add_subdirectory(python)
add_subdirectory(grc)
# NOTE: manually update below to use GRC to generate C++ flowgraphs w/o python
if(ENABLE_PYTHON)
message(STATUS "PYTHON and GRC components are enabled")
add_subdirectory(python/tempest)
add_subdirectory(grc)
else(ENABLE_PYTHON)
message(STATUS "PYTHON and GRC components are disabled")
endif(ENABLE_PYTHON)

########################################################################
# Install cmake search helper for this library
########################################################################

install(FILES cmake/Modules/tempestConfig.cmake
DESTINATION ${CMAKE_MODULES_DIR}/tempest
install(FILES cmake/Modules/gnuradio-tempestConfig.cmake
DESTINATION ${GR_CMAKE_DIR}
)

include(CMakePackageConfigHelpers)
configure_package_config_file(
${PROJECT_SOURCE_DIR}/cmake/Modules/targetConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/Modules/${target}Config.cmake
INSTALL_DESTINATION ${GR_CMAKE_DIR}
)

14 changes: 1 addition & 13 deletions gr-tempest/apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,8 @@
# This file was generated by gr_modtool, a tool from the GNU Radio framework
# This file is a part of gr-tempest
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# SPDX-License-Identifier: GPL-3.0-or-later
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.

include(GrPython)

Expand Down
32 changes: 32 additions & 0 deletions gr-tempest/cmake/Modules/gnuradio-tempestConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
find_package(PkgConfig)

PKG_CHECK_MODULES(PC_GR_TEMPEST gnuradio-tempest)

FIND_PATH(
GR_TEMPEST_INCLUDE_DIRS
NAMES gnuradio/tempest/api.h
HINTS $ENV{TEMPEST_DIR}/include
${PC_TEMPEST_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
/usr/local/include
/usr/include
)

FIND_LIBRARY(
GR_TEMPEST_LIBRARIES
NAMES gnuradio-tempest
HINTS $ENV{TEMPEST_DIR}/lib
${PC_TEMPEST_LIBDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
)

include("${CMAKE_CURRENT_LIST_DIR}/gnuradio-tempestTarget.cmake")

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GR_TEMPEST DEFAULT_MSG GR_TEMPEST_LIBRARIES GR_TEMPEST_INCLUDE_DIRS)
MARK_AS_ADVANCED(GR_TEMPEST_LIBRARIES GR_TEMPEST_INCLUDE_DIRS)
14 changes: 1 addition & 13 deletions gr-tempest/cmake/Modules/targetConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,8 @@
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# SPDX-License-Identifier: GPL-3.0-or-later
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.

include(CMakeFindDependencyMacro)

Expand Down
14 changes: 1 addition & 13 deletions gr-tempest/docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,8 @@
# This file was generated by gr_modtool, a tool from the GNU Radio framework
# This file is a part of gr-tempest
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# SPDX-License-Identifier: GPL-3.0-or-later
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.

########################################################################
# Setup dependencies
Expand Down
15 changes: 2 additions & 13 deletions gr-tempest/docs/doxygen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,8 @@
# This file was generated by gr_modtool, a tool from the GNU Radio framework
# This file is a part of gr-tempest
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# SPDX-License-Identifier: GPL-3.0-or-later
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.

########################################################################
# Create the doxygen configuration file
Expand All @@ -29,6 +17,7 @@ file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} abs_top_builddir)
set(HAVE_DOT ${DOXYGEN_DOT_FOUND})
set(enable_html_docs YES)
set(enable_latex_docs NO)
set(enable_mathjax NO)
set(enable_xml_docs YES)

configure_file(
Expand Down
41 changes: 6 additions & 35 deletions gr-tempest/docs/doxygen/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,6 @@ TAB_SIZE = 8

ALIASES =

# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding
# "class=itcl::class" will allow you to use the command class in the
# itcl::class meaning.

TCL_SUBST =

# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
# sources only. Doxygen will then generate output that is more tailored for C.
# For instance, some of the names that are used will be different. The list
Expand Down Expand Up @@ -723,8 +716,6 @@ EXCLUDE_PATTERNS = */.deps/* \

EXCLUDE_SYMBOLS = ad9862 \
numpy \
*swig* \
*Swig* \
*my_top_block* \
*my_graph* \
*app_top_block* \
Expand Down Expand Up @@ -790,7 +781,7 @@ INPUT_FILTER =
# info on how filters are used. If FILTER_PATTERNS is empty or if
# non of the patterns match the file name, INPUT_FILTER is applied.

FILTER_PATTERNS = *.py="@top_srcdir@"/doc/doxygen/other/doxypy.py
FILTER_PATTERNS = *.py=@top_srcdir@/docs/doxygen/other/doxypy.py

# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
# INPUT_FILTER) will be used to filter the input files when producing source
Expand Down Expand Up @@ -879,12 +870,6 @@ VERBATIM_HEADERS = YES

ALPHABETICAL_INDEX = YES

# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
# in which this list will be split (can be a number in the range [1..20])

COLS_IN_ALPHA_INDEX = 5

# In case all classes in a project start with a common prefix, all
# classes will be put under the same header in the alphabetical index.
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
Expand Down Expand Up @@ -1220,14 +1205,14 @@ FORMULA_TRANSPARENT = YES
# output. When enabled you may also need to install MathJax separately and
# configure the path to it using the MATHJAX_RELPATH option.

USE_MATHJAX = NO
USE_MATHJAX = @enable_mathjax@

# When MathJax is enabled you can set the default output format to be used for
# the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and
# SVG. The default value is HTML-CSS, which is slower, but has the best
# compatibility.

MATHJAX_FORMAT = HTML-CSS
MATHJAX_FORMAT = SVG

# When MathJax is enabled you need to specify the location relative to the
# HTML output directory using the MATHJAX_RELPATH option. The destination
Expand All @@ -1239,12 +1224,12 @@ MATHJAX_FORMAT = HTML-CSS
# However, it is strongly recommended to install a local
# copy of MathJax from http://www.mathjax.org before deployment.

MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_RELPATH = @MATHJAX2_PATH@

# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
# names that should be enabled during MathJax rendering.

MATHJAX_EXTENSIONS =
MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols

# The MATHJAX_CODEFILE tag can be used to specify a file with javascript
# pieces of code that will be used on startup of the MathJax code.
Expand Down Expand Up @@ -1680,11 +1665,6 @@ EXTERNAL_GROUPS = YES

EXTERNAL_PAGES = YES

# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl').

PERL_PATH = /usr/bin/perl

#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
Expand All @@ -1697,15 +1677,6 @@ PERL_PATH = /usr/bin/perl

CLASS_DIAGRAMS = YES

# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see
# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.

MSCGEN_PATH =

# If set to YES, the inheritance and collaboration graphs will hide
# inheritance and usage relations if the target is undocumented
# or is not a class.
Expand Down Expand Up @@ -1834,7 +1805,7 @@ DIRECTORY_GRAPH = YES
# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
# visible in IE 9+ (other browsers do not have this requirement).

DOT_IMAGE_FORMAT = png
DOT_IMAGE_FORMAT = svg

# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning.
Expand Down
Loading