From 0a21526a6884d73c15471674175c3156d2124a23 Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 17 Apr 2022 23:56:57 +0100 Subject: [PATCH] Tidying --- CMakeLists.txt | 8 ++++++-- src/Application.hpp | 3 ++- src/TargetController/TargetControllerComponent.cpp | 2 +- src/TargetController/TargetControllerComponent.hpp | 4 +++- src/TargetController/TargetControllerConsole.cpp | 3 ++- src/Targets/Microchip/AVR/AVR8/Avr8.cpp | 2 +- src/Targets/Target.hpp | 2 +- 7 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9cfea9f..4397462c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,11 +13,9 @@ set(ENABLE_SANITIZERS off) add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) -# The HIDAPI library lives here link_directories(/usr/local/lib) set(CMAKE_AUTOMOC ON) -set(CMAKE_INCLUDE_CURRENT_DIR ON) set(AUTOGEN_BUILD_DIR ../build/) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/build/bin") @@ -30,6 +28,12 @@ find_package(Qt6UiTools REQUIRED) find_package(Qt6SvgWidgets REQUIRED) find_package(Qt6Network REQUIRED) +# Bloom is distributed with some third-party dependencies (in the form of shared objects). These dependencies are +# distributed with Bloom for various reasons (licensing, availability in some package managers, etc). +# +# The shared objects are located in bin/lib (relative to Bloom's installation directory). For this reason, we instruct +# the dynamic linker to look for any of Bloom's shared object dependencies in that location first. We do this by +# including '$ORIGIN/lib' in the RPATH of Bloom's binary executable. set(CMAKE_SKIP_BUILD_RPATH false) set(CMAKE_BUILD_RPATH_USE_ORIGIN true) set(CMAKE_INSTALL_RPATH "\$ORIGIN/lib:/usr/local/lib") diff --git a/src/Application.hpp b/src/Application.hpp index 61ca8cfd..3dc20a69 100644 --- a/src/Application.hpp +++ b/src/Application.hpp @@ -228,7 +228,8 @@ namespace Bloom void stopSignalHandler(); /** - * Prepares a dedicated thread for the TargetController and kicks it off with a call to TargetController::run(). + * Prepares a dedicated thread for the TargetController and kicks it off with a call to + * TargetControllerComponent::run(). */ void startTargetController(); diff --git a/src/TargetController/TargetControllerComponent.cpp b/src/TargetController/TargetControllerComponent.cpp index 99638ec1..f0254d77 100644 --- a/src/TargetController/TargetControllerComponent.cpp +++ b/src/TargetController/TargetControllerComponent.cpp @@ -942,7 +942,7 @@ namespace Bloom::TargetController * Insight has just started up. * * Refresh the target state and kick off a target stop/resume execution event. Setting the lastTargetState - * to UNKNOWN will be enough to do this. See TargetController::fireTargetEvents(). + * to UNKNOWN will be enough to do this. See TargetControllerComponent::fireTargetEvents(). */ this->lastTargetState = TargetState::UNKNOWN; } diff --git a/src/TargetController/TargetControllerComponent.hpp b/src/TargetController/TargetControllerComponent.hpp index d2937bf1..1c2e7b47 100644 --- a/src/TargetController/TargetControllerComponent.hpp +++ b/src/TargetController/TargetControllerComponent.hpp @@ -75,8 +75,10 @@ namespace Bloom::TargetController static inline ConditionVariableNotifier notifier = ConditionVariableNotifier(); static inline std::condition_variable responsesByCommandIdCv = std::condition_variable(); + /** - * The TC starts off in a suspended state. TargetController::resume() is invoked from the startup routine. + * The TC starts off in a suspended state. TargetControllerComponent::resume() is invoked from the startup + * routine. */ TargetControllerState state = TargetControllerState::SUSPENDED; diff --git a/src/TargetController/TargetControllerConsole.cpp b/src/TargetController/TargetControllerConsole.cpp index 9ff25170..dc99bf2f 100644 --- a/src/TargetController/TargetControllerConsole.cpp +++ b/src/TargetController/TargetControllerConsole.cpp @@ -10,7 +10,8 @@ namespace Bloom::TargetController using namespace Bloom::Exceptions; TargetControllerConsole::TargetControllerConsole(EventListener& eventListener) - :eventListener(eventListener) {} + : eventListener(eventListener) + {} TargetControllerState TargetControllerConsole::getTargetControllerState() { return this->triggerTargetControllerEventAndWaitForResponse( diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp index 3a57edb7..f62174f6 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp @@ -79,7 +79,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit * * We don't use this->getId() here as that could return the ID that was extracted from the target description * file (which it would, if the user specified the exact target name in their project config - see - * Avr8::getId() and TargetController::getSupportedTargets() for more). + * Avr8::getId() and TargetControllerComponent::getSupportedTargets() for more). */ auto targetSignature = this->avr8DebugInterface->getDeviceId(); auto tdSignature = this->targetDescriptionFile->getTargetSignature(); diff --git a/src/Targets/Target.hpp b/src/Targets/Target.hpp index 772b0121..aa136db3 100644 --- a/src/Targets/Target.hpp +++ b/src/Targets/Target.hpp @@ -157,7 +157,7 @@ namespace Bloom::Targets * Once at least one of the above conditions are met, the TargetController will break out of the loop and use * the last promoted target instance from there onwards. * - * See TargetController::acquireHardware() for more on this. + * See TargetControllerComponent::acquireHardware() for more on this. * * @return */