summaryrefslogtreecommitdiff
path: root/gr-trellis
diff options
context:
space:
mode:
Diffstat (limited to 'gr-trellis')
-rw-r--r--gr-trellis/CMakeLists.txt28
-rw-r--r--gr-trellis/doc/CMakeLists.txt22
-rw-r--r--gr-trellis/grc/CMakeLists.txt2
-rw-r--r--gr-trellis/src/examples/CMakeLists.txt6
-rw-r--r--gr-trellis/src/lib/CMakeLists.txt94
-rw-r--r--gr-trellis/src/python/CMakeLists.txt18
6 files changed, 85 insertions, 85 deletions
diff --git a/gr-trellis/CMakeLists.txt b/gr-trellis/CMakeLists.txt
index a0ae29f8d..226ea7e4d 100644
--- a/gr-trellis/CMakeLists.txt
+++ b/gr-trellis/CMakeLists.txt
@@ -20,12 +20,12 @@
########################################################################
# Setup dependencies
########################################################################
-INCLUDE(GrBoost)
+include(GrBoost)
########################################################################
# Register component
########################################################################
-INCLUDE(GrComponent)
+include(GrComponent)
GR_REGISTER_COMPONENT("gr-trellis" ENABLE_GR_TRELLIS
Boost_FOUND
ENABLE_GR_CORE_
@@ -40,12 +40,12 @@ GR_SET_GLOBAL(GR_TRELLIS_INCLUDE_DIRS
########################################################################
# Begin conditional configuration
########################################################################
-IF(ENABLE_GR_TRELLIS)
+if(ENABLE_GR_TRELLIS)
########################################################################
# Setup CPack components
########################################################################
-INCLUDE(GrPackage)
+include(GrPackage)
CPACK_SET(CPACK_COMPONENT_GROUP_TRELLIS_DESCRIPTION "GNU Radio Trellis Blocks")
CPACK_COMPONENT("trellis_docs"
@@ -92,26 +92,26 @@ CPACK_COMPONENT("trellis_swig"
########################################################################
# Add subdirectories
########################################################################
-ADD_SUBDIRECTORY(src/lib)
-ADD_SUBDIRECTORY(doc)
-IF(ENABLE_PYTHON)
- ADD_SUBDIRECTORY(grc)
- ADD_SUBDIRECTORY(src/python)
- ADD_SUBDIRECTORY(src/examples)
-ENDIF(ENABLE_PYTHON)
+add_subdirectory(src/lib)
+add_subdirectory(doc)
+if(ENABLE_PYTHON)
+ add_subdirectory(grc)
+ add_subdirectory(src/python)
+ add_subdirectory(src/examples)
+endif(ENABLE_PYTHON)
########################################################################
# Create Pkg Config File
########################################################################
-CONFIGURE_FILE(
+configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-trellis.pc.in
${CMAKE_CURRENT_BINARY_DIR}/gnuradio-trellis.pc
@ONLY)
-INSTALL(
+install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-trellis.pc
DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
COMPONENT "trellis_devel"
)
-ENDIF(ENABLE_GR_TRELLIS)
+endif(ENABLE_GR_TRELLIS)
diff --git a/gr-trellis/doc/CMakeLists.txt b/gr-trellis/doc/CMakeLists.txt
index 41ccf7f8e..a45202861 100644
--- a/gr-trellis/doc/CMakeLists.txt
+++ b/gr-trellis/doc/CMakeLists.txt
@@ -17,33 +17,33 @@
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-INCLUDE(GrPython)
+include(GrPython)
########################################################################
# Generate HTML doc with xmlto
########################################################################
-FIND_PROGRAM(XMLTO_EXECUTABLE xmlto)
+find_program(XMLTO_EXECUTABLE xmlto)
-IF(XMLTO_EXECUTABLE)
-ADD_CUSTOM_COMMAND(
+if(XMLTO_EXECUTABLE)
+add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gr-trellis.html
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gr-trellis.xml
COMMAND ${XMLTO_EXECUTABLE} html-nochunks
${CMAKE_CURRENT_SOURCE_DIR}/gr-trellis.xml
)
-ADD_CUSTOM_TARGET(gr_trellis_html ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gr-trellis.html)
-INSTALL(
+add_custom_target(gr_trellis_html ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gr-trellis.html)
+install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/gr-trellis.html
DESTINATION ${GR_PKG_DOC_DIR}/html
COMPONENT "trellis_docs"
)
-ENDIF(XMLTO_EXECUTABLE)
+endif(XMLTO_EXECUTABLE)
########################################################################
# Generate xml doc
########################################################################
-ADD_CUSTOM_COMMAND(
+add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_tcm.py.xml
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/test_tcm.py
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_numbered_listing.py
@@ -52,7 +52,7 @@ ADD_CUSTOM_COMMAND(
${CMAKE_CURRENT_SOURCE_DIR}/test_tcm.py
)
-ADD_CUSTOM_COMMAND(
+add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_viterbi_equalization1.py.xml
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/test_viterbi_equalization1.py
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_numbered_listing.py
@@ -61,11 +61,11 @@ ADD_CUSTOM_COMMAND(
${CMAKE_CURRENT_SOURCE_DIR}/test_viterbi_equalization1.py
)
-ADD_CUSTOM_TARGET(gr_trellis_xml ALL DEPENDS
+add_custom_target(gr_trellis_xml ALL DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/test_tcm.py.xml
${CMAKE_CURRENT_BINARY_DIR}/test_viterbi_equalization1.py.xml
)
-INSTALL(FILES
+install(FILES
${CMAKE_CURRENT_BINARY_DIR}/test_tcm.py.xml
${CMAKE_CURRENT_BINARY_DIR}/test_viterbi_equalization1.py.xml
DESTINATION ${GR_PKG_DOC_DIR}/xml
diff --git a/gr-trellis/grc/CMakeLists.txt b/gr-trellis/grc/CMakeLists.txt
index 13188343d..d60d64872 100644
--- a/gr-trellis/grc/CMakeLists.txt
+++ b/gr-trellis/grc/CMakeLists.txt
@@ -17,7 +17,7 @@
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-INSTALL(FILES
+install(FILES
trellis_encoder_xx.xml
trellis_siso_combined_f.xml
trellis_viterbi_x.xml
diff --git a/gr-trellis/src/examples/CMakeLists.txt b/gr-trellis/src/examples/CMakeLists.txt
index 2a98c9c67..0d9589908 100644
--- a/gr-trellis/src/examples/CMakeLists.txt
+++ b/gr-trellis/src/examples/CMakeLists.txt
@@ -17,7 +17,7 @@
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-INCLUDE(GrPython)
+include(GrPython)
GR_PYTHON_INSTALL(
PROGRAMS
@@ -37,13 +37,13 @@ GR_PYTHON_INSTALL(
COMPONENT "trellis_examples"
)
-INSTALL(
+install(
FILES README
DESTINATION ${GR_PKG_DATA_DIR}/examples/trellis
COMPONENT "trellis_examples"
)
-INSTALL(
+install(
FILES
fsm_files/awgn1o2_128.fsm
fsm_files/awgn1o2_16.fsm
diff --git a/gr-trellis/src/lib/CMakeLists.txt b/gr-trellis/src/lib/CMakeLists.txt
index 3e449bcf8..da41f1469 100644
--- a/gr-trellis/src/lib/CMakeLists.txt
+++ b/gr-trellis/src/lib/CMakeLists.txt
@@ -20,19 +20,19 @@
########################################################################
# Setup the include and linker paths
########################################################################
-INCLUDE_DIRECTORIES(
+include_directories(
${GNURADIO_CORE_INCLUDE_DIRS}
${GR_TRELLIS_INCLUDE_DIRS}
${GR_DIGITAL_INCLUDE_DIRS}
)
-INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
-LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+include_directories(${Boost_INCLUDE_DIRS})
+link_directories(${Boost_LIBRARY_DIRS})
########################################################################
# generate the python helper script which calls into the build utils
########################################################################
-FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
#!${PYTHON_EXECUTABLE}
import sys, os, re
@@ -54,37 +54,37 @@ if __name__ == '__main__':
########################################################################
# generation helper macro to generate various files from template
########################################################################
-MACRO(expand_h_cc_i root)
+macro(expand_h_cc_i root)
- FOREACH(ext h cc i)
+ foreach(ext h cc i)
#make a list of all the generated files
- UNSET(expanded_files_${ext})
- FOREACH(sig ${ARGN})
- STRING(REGEX REPLACE "X+" ${sig} name ${root})
- LIST(APPEND expanded_files_${ext} ${CMAKE_CURRENT_BINARY_DIR}/${name}.${ext})
- ENDFOREACH(sig)
+ unset(expanded_files_${ext})
+ foreach(sig ${ARGN})
+ string(REGEX REPLACE "X+" ${sig} name ${root})
+ list(APPEND expanded_files_${ext} ${CMAKE_CURRENT_BINARY_DIR}/${name}.${ext})
+ endforeach(sig)
#create a command to generate the files
- ADD_CUSTOM_COMMAND(
+ add_custom_command(
OUTPUT ${expanded_files_${ext}}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.${ext}.t
COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
${root} ${root}.${ext}.t ${ARGN}
)
- ENDFOREACH(ext)
+ endforeach(ext)
#make source files depends on headers to force generation
- SET_SOURCE_FILES_PROPERTIES(${expanded_files_cc}
+ set_source_files_properties(${expanded_files_cc}
PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
)
#install rules for the generated cc, h, and i files
- LIST(APPEND generated_trellis_sources ${expanded_files_cc})
- LIST(APPEND generated_trellis_includes ${expanded_files_h})
- LIST(APPEND generated_trellis_swigs ${expanded_files_i})
+ list(APPEND generated_trellis_sources ${expanded_files_cc})
+ list(APPEND generated_trellis_includes ${expanded_files_h})
+ list(APPEND generated_trellis_swigs ${expanded_files_i})
-ENDMACRO(expand_h_cc_i)
+endmacro(expand_h_cc_i)
########################################################################
# Invoke macro to generate various sources
@@ -100,7 +100,7 @@ expand_h_cc_i(trellis_sccc_decoder_combined_XX fb fs fi cb cs ci)
expand_h_cc_i(trellis_pccc_decoder_X b s i)
expand_h_cc_i(trellis_pccc_decoder_combined_XX fb fs fi cb cs ci)
-ADD_CUSTOM_TARGET(trellis_generated DEPENDS
+add_custom_target(trellis_generated DEPENDS
${generated_trellis_includes}
${generated_trellis_swigs}
)
@@ -108,28 +108,28 @@ ADD_CUSTOM_TARGET(trellis_generated DEPENDS
########################################################################
# Create the master trellis swig include files
########################################################################
-FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i "
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i "
//
// This file is machine generated. All edits will be overwritten
//
")
-FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i "%{\n")
-FOREACH(swig_file ${generated_trellis_swigs})
- GET_FILENAME_COMPONENT(name ${swig_file} NAME_WE)
- FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i "#include<${name}.h>\n")
-ENDFOREACH(swig_file)
-FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i "%}\n")
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i "%{\n")
+foreach(swig_file ${generated_trellis_swigs})
+ get_filename_component(name ${swig_file} NAME_WE)
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i "#include<${name}.h>\n")
+endforeach(swig_file)
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i "%}\n")
-FOREACH(swig_file ${generated_trellis_swigs})
- GET_FILENAME_COMPONENT(name ${swig_file} NAME)
- FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i "%include<${name}>\n")
-ENDFOREACH(swig_file)
+foreach(swig_file ${generated_trellis_swigs})
+ get_filename_component(name ${swig_file} NAME)
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i "%include<${name}>\n")
+endforeach(swig_file)
########################################################################
# Setup library
########################################################################
-LIST(APPEND gr_trellis_sources
+list(APPEND gr_trellis_sources
fsm.cc
quicksort_index.cc
base.cc
@@ -143,17 +143,17 @@ LIST(APPEND gr_trellis_sources
${generated_trellis_sources}
)
-LIST(APPEND trellis_libs
+list(APPEND trellis_libs
gnuradio-core
${Boost_LIBRARIES}
)
-ADD_LIBRARY(gnuradio-trellis SHARED ${gr_trellis_sources})
-TARGET_LINK_LIBRARIES(gnuradio-trellis ${trellis_libs})
-SET_TARGET_PROPERTIES(gnuradio-trellis PROPERTIES DEFINE_SYMBOL "gnuradio_trellis_EXPORTS")
-SET_TARGET_PROPERTIES(gnuradio-trellis PROPERTIES SOVERSION ${LIBVER})
+add_library(gnuradio-trellis SHARED ${gr_trellis_sources})
+target_link_libraries(gnuradio-trellis ${trellis_libs})
+set_target_properties(gnuradio-trellis PROPERTIES DEFINE_SYMBOL "gnuradio_trellis_EXPORTS")
+set_target_properties(gnuradio-trellis PROPERTIES SOVERSION ${LIBVER})
-INSTALL(TARGETS gnuradio-trellis
+install(TARGETS gnuradio-trellis
LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "trellis_runtime" # .so/.dylib file
ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "trellis_devel" # .lib file
RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "trellis_runtime" # .dll file
@@ -162,7 +162,7 @@ INSTALL(TARGETS gnuradio-trellis
########################################################################
# Handle the generated sources + a few non-generated ones
########################################################################
-INSTALL(FILES
+install(FILES
${generated_trellis_includes}
trellis_api.h
fsm.h
@@ -180,8 +180,8 @@ INSTALL(FILES
COMPONENT "trellis_devel"
)
-IF(ENABLE_PYTHON)
- INSTALL(FILES
+if(ENABLE_PYTHON)
+ install(FILES
${generated_trellis_swigs}
fsm.i
interleaver.i
@@ -197,16 +197,16 @@ IF(ENABLE_PYTHON)
########################################################################
# Setup swig generation
########################################################################
-INCLUDE(GrPython)
-INCLUDE(GrSwig)
+include(GrPython)
+include(GrSwig)
-SET(GR_SWIG_TARGET_DEPS gengen_generated trellis_generated)
-SET(GR_SWIG_INCLUDE_DIRS
+set(GR_SWIG_TARGET_DEPS gengen_generated trellis_generated)
+set(GR_SWIG_INCLUDE_DIRS
${GR_TRELLIS_INCLUDE_DIRS}
${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
${GR_DIGITAL_SWIG_INCLUDE_DIRS}
)
-SET(GR_SWIG_LIBRARIES gnuradio-trellis)
+set(GR_SWIG_LIBRARIES gnuradio-trellis)
GR_SWIG_MAKE(trellis trellis.i)
GR_SWIG_INSTALL(
@@ -215,10 +215,10 @@ GR_SWIG_INSTALL(
COMPONENT "trellis_python"
)
-INSTALL(
+install(
FILES trellis.i
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
COMPONENT "trellis_swig"
)
-ENDIF(ENABLE_PYTHON)
+endif(ENABLE_PYTHON)
diff --git a/gr-trellis/src/python/CMakeLists.txt b/gr-trellis/src/python/CMakeLists.txt
index 9cd645fe4..9a9cc6aed 100644
--- a/gr-trellis/src/python/CMakeLists.txt
+++ b/gr-trellis/src/python/CMakeLists.txt
@@ -20,18 +20,18 @@
########################################################################
# Handle the unit tests
########################################################################
-IF(ENABLE_TESTING)
-INCLUDE(GrTest)
-FILE(GLOB py_qa_test_files "qa_*.py")
-FOREACH(py_qa_test_file ${py_qa_test_files})
- GET_FILENAME_COMPONENT(py_qa_test_name ${py_qa_test_file} NAME_WE)
- SET(GR_TEST_PYTHON_DIRS
+if(ENABLE_TESTING)
+include(GrTest)
+file(GLOB py_qa_test_files "qa_*.py")
+foreach(py_qa_test_file ${py_qa_test_files})
+ get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
+ set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-core/src/python
${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig
${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 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)
+endforeach(py_qa_test_file)
+endif(ENABLE_TESTING)