Skip to content

Commit

Permalink
change SERIAL_DEBUG into RF24NETWORK_DEBUG (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Jun 15, 2024
1 parent 09160e9 commit 5a71a66
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 100 deletions.
40 changes: 20 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ target_compile_features(${LibTargetName}_project_options INTERFACE cxx_std_17)
add_compile_options(-Ofast -Wall)

# allow using CMake options to adjust RF24Network_config.h without modiying source code
option(SERIAL_DEBUG "enable/disable general debugging output" OFF)
option(SERIAL_DEBUG_MINIMAL "enable/disable minimal debugging output" OFF)
option(SERIAL_DEBUG_ROUTING
option(RF24NETWORK_DEBUG "enable/disable general debugging output" OFF)
option(RF24NETWORK_DEBUG_MINIMAL "enable/disable minimal debugging output" OFF)
option(RF24NETWORK_DEBUG_ROUTING
"enable/disable debugging output related to transmission routing"
OFF
)
option(SERIAL_DEBUG_FRAGMENTATION
option(RF24NETWORK_DEBUG_FRAGMENTATION
"enable/disable debugging output related to message fragmentation"
OFF
)
option(SERIAL_DEBUG_FRAGMENTATION_L2
option(RF24NETWORK_DEBUG_FRAGMENTATION_L2
"enable/disable debugging output related to fragmented messages' transmission success"
OFF
)
Expand Down Expand Up @@ -114,25 +114,25 @@ set_target_properties(
)

# assert the appropriate preprocessor macros for RF24Network_config.h
if(SERIAL_DEBUG)
message(STATUS "SERIAL_DEBUG asserted")
target_compile_definitions(${LibTargetName} PUBLIC SERIAL_DEBUG)
if(RF24NETWORK_DEBUG)
message(STATUS "RF24NETWORK_DEBUG asserted")
target_compile_definitions(${LibTargetName} PUBLIC RF24NETWORK_DEBUG)
endif()
if(SERIAL_DEBUG_MINIMAL)
message(STATUS "SERIAL_DEBUG_MINIMAL asserted")
target_compile_definitions(${LibTargetName} PUBLIC SERIAL_DEBUG_MINIMAL)
if(RF24NETWORK_DEBUG_MINIMAL)
message(STATUS "RF24NETWORK_DEBUG_MINIMAL asserted")
target_compile_definitions(${LibTargetName} PUBLIC RF24NETWORK_DEBUG_MINIMAL)
endif()
if(SERIAL_DEBUG_ROUTING)
message(STATUS "SERIAL_DEBUG_ROUTING asserted")
target_compile_definitions(${LibTargetName} PUBLIC SERIAL_DEBUG_ROUTING)
if(RF24NETWORK_DEBUG_ROUTING)
message(STATUS "RF24NETWORK_DEBUG_ROUTING asserted")
target_compile_definitions(${LibTargetName} PUBLIC RF24NETWORK_DEBUG_ROUTING)
endif()
if(SERIAL_DEBUG_FRAGMENTATION)
message(STATUS "SERIAL_DEBUG_FRAGMENTATION asserted")
target_compile_definitions(${LibTargetName} PUBLIC SERIAL_DEBUG_FRAGMENTATION)
if(RF24NETWORK_DEBUG_FRAGMENTATION)
message(STATUS "RF24NETWORK_DEBUG_FRAGMENTATION asserted")
target_compile_definitions(${LibTargetName} PUBLIC RF24NETWORK_DEBUG_FRAGMENTATION)
endif()
if(SERIAL_DEBUG_FRAGMENTATION_L2)
message(STATUS "SERIAL_DEBUG_FRAGMENTATION_L2 asserted")
target_compile_definitions(${LibTargetName} PUBLIC SERIAL_DEBUG_FRAGMENTATION_L2)
if(RF24NETWORK_DEBUG_FRAGMENTATION_L2)
message(STATUS "RF24NETWORK_DEBUG_FRAGMENTATION_L2 asserted")
target_compile_definitions(${LibTargetName} PUBLIC RF24NETWORK_DEBUG_FRAGMENTATION_L2)
endif()
if(DISABLE_FRAGMENTATION)
message(STATUS "DISABLE_FRAGMENTATION asserted")
Expand Down
Loading

0 comments on commit 5a71a66

Please sign in to comment.