Skip to content

Commit

Permalink
Fix compilation issues on Linux build
Browse files Browse the repository at this point in the history
Re ECFLOW-1931
  • Loading branch information
marcosbento committed Jun 17, 2024
1 parent fb1a039 commit 310cb39
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
1 change: 1 addition & 0 deletions libs/aviso/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ecbuild_add_executable(
src/aviso/AvisoMain.cpp
LIBS
libaviso
Threads::Threads
)
target_clangformat(ecflow_aviso)

Expand Down
1 change: 1 addition & 0 deletions libs/aviso/src/aviso/ConfiguredListener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#ifndef aviso_ConfiguredListener_HPP
#define aviso_ConfiguredListener_HPP

#include <cstdint>
#include <optional>
#include <string>
#include <unordered_map>
Expand Down
2 changes: 2 additions & 0 deletions libs/aviso/src/aviso/ListenService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#ifndef aviso_ListenService_HPP
#define aviso_ListenService_HPP

#include <functional>

#include "aviso/ConfiguredListener.hpp"
#include "aviso/ListenerSchema.hpp"
#include "aviso/PeriodicExecutor.hpp"
Expand Down
1 change: 1 addition & 0 deletions libs/aviso/src/aviso/ListenerSchema.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#ifndef aviso_ListenerSchema_HPP
#define aviso_ListenerSchema_HPP

#include <optional>
#include <string>
#include <unordered_map>

Expand Down
44 changes: 22 additions & 22 deletions libs/service/src/ecflow/service/Registry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,36 +120,36 @@ class BaseRegistry {
template <typename Service>
Service& register_service(std::string_view name);

template <>
AvisoController& register_service<AvisoController>(std::string_view name [[maybe_unused]]) {
// Nothing to register, actually...
return controller_;
}

template <>
AvisoRunner& register_service<AvisoRunner>(std::string_view name [[maybe_unused]]) {
// Nothing to register, actually...
return runner_;
}

template <typename Service>
Service& get_service(std::string_view name);

template <>
AvisoController& get_service<AvisoController>(std::string_view name [[maybe_unused]]) {
return controller_;
}

template <>
AvisoRunner& get_service<AvisoRunner>(std::string_view name [[maybe_unused]]) {
return runner_;
}

private:
AvisoController controller_;
AvisoRunner runner_;
};

template <>
inline AvisoController& BaseRegistry::register_service<AvisoController>(std::string_view name [[maybe_unused]]) {
// Nothing to register, actually...
return controller_;
}

template <>
inline AvisoRunner& BaseRegistry::register_service<AvisoRunner>(std::string_view name [[maybe_unused]]) {
// Nothing to register, actually...
return runner_;
}

template <>
inline AvisoController& BaseRegistry::get_service<AvisoController>(std::string_view name [[maybe_unused]]) {
return controller_;
}

template <>
inline AvisoRunner& BaseRegistry::get_service<AvisoRunner>(std::string_view name [[maybe_unused]]) {
return runner_;
}

using Registry = BaseRegistry;

///
Expand Down

0 comments on commit 310cb39

Please sign in to comment.