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

explicit pmtv formatter header, new EMBEDDED & IWYU integration #325

Merged
merged 1 commit into from
Apr 28, 2024
Merged
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
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
set(ALL_COMPILER_FLAGS "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS}")
elseif(CMAKE_BUILD_TYPE MATCHES MinSizeRel)
set(ALL_COMPILER_FLAGS "${CMAKE_CXX_FLAGS_MINSIZEREL} ${CMAKE_CXX_FLAGS}")
# 'EMBEDDED is used to disable/minimise code features for embedded systems (e.g. code-size, console printouts, etc.)
add_compile_definitions(EMBEDDED)
endif()
# Replace ; with space
string(REPLACE ";" " " ALL_COMPILER_FLAGS "${ALL_COMPILER_FLAGS}")
Expand All @@ -68,6 +70,13 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-fdiagnostics-color=always)
endif()

# Include What You Use tooling: https://github.com/include-what-you-use/include-what-you-use
find_program(INCLUDE_WHAT_YOU_USE_TOOL_PATH NAMES include-what-you-use iwyu)
if(INCLUDE_WHAT_YOU_USE_TOOL_PATH)
message(" using 'Include What You Use' path: (${INCLUDE_WHAT_YOU_USE_TOOL_PATH})")
set_property(GLOBAL PROPERTY CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${INCLUDE_WHAT_YOU_USE_TOOL_PATH})
endif()

# Mainly for FMT
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)

Expand Down
2 changes: 1 addition & 1 deletion blocks/basic/test/qa_PythonBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def process_bulk(ins, outs):

bool throws = false;
try {
myBlock.applyChangedSettings(); // needed for unit-test only when executed outside a Scheduler/Graph
std::ignore = myBlock.settings().applyStagedParameters(); // needed for unit-test only when executed outside a Scheduler/Graph
} catch (const std::exception &ex) {
throws = true;
fmt::println("myBlock.processBulk(...) - correctly threw SyntaxError exception:\n {}", ex.what());
Expand Down
2 changes: 2 additions & 0 deletions core/include/gnuradio-4.0/Tag.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

#include <pmtv/pmt.hpp>

#include <pmtv/format.hpp>

#include <gnuradio-4.0/meta/utils.hpp>

#include "reflection.hpp"
Expand Down
Loading