Skip to content

Commit

Permalink
Reworked all #include directives
Browse files Browse the repository at this point in the history
All the directives are now fixed instead of relative.
We also moved the headers to a different directory.

Signed-off-by: Vinícius Ferrão <[email protected]>
  • Loading branch information
viniciusferrao committed Jul 10, 2023
1 parent eb0025c commit 7dfe912
Show file tree
Hide file tree
Showing 90 changed files with 158 additions and 186 deletions.
2 changes: 1 addition & 1 deletion src/NFS.h → include/cloysterhpc/NFS.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#ifndef CLOYSTERHPC_NFS_H_
#define CLOYSTERHPC_NFS_H_

#include "services/IService.h"
#include <boost/asio.hpp>
#include <cloysterhpc/services/IService.h>
#include <string>

class NFS : public IService {
Expand Down
2 changes: 1 addition & 1 deletion include/cloysterhpc/cloyster.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_CLOYSTER_H_
#define CLOYSTERHPC_CLOYSTER_H_

#include "../src/services/log.h"
#include <cloysterhpc/services/log.h>
#include <fmt/format.h>
#include <magic_enum.hpp>
#include <string>
Expand Down
18 changes: 9 additions & 9 deletions src/cluster.h → include/cloysterhpc/cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
#include <optional>
#include <string>

#include "diskImage.h"
#include "headnode.h"
#include "mailsystem/postfix.h"
#include "network.h"
#include "node.h"
#include "ofed.h"
#include "queuesystem/pbs.h"
#include "queuesystem/slurm.h"
#include "services/timezone.h"
#include <cloysterhpc/diskImage.h>
#include <cloysterhpc/headnode.h>
#include <cloysterhpc/mailsystem/postfix.h>
#include <cloysterhpc/network.h>
#include <cloysterhpc/node.h>
#include <cloysterhpc/ofed.h>
#include <cloysterhpc/queuesystem/pbs.h>
#include <cloysterhpc/queuesystem/slurm.h>
#include <cloysterhpc/services/timezone.h>

class Cluster {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/connection.h → include/cloysterhpc/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_CONNECTION_H_
#define CLOYSTERHPC_CONNECTION_H_

#include "network.h"
#include <cloysterhpc/network.h>

#include <arpa/inet.h>
#include <boost/asio.hpp>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/headnode.h → include/cloysterhpc/headnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include <memory>
#include <string>

#include "connection.h"
#include "network.h"
#include "os.h"
#include "server.h"
#include <cloysterhpc/connection.h>
#include <cloysterhpc/network.h>
#include <cloysterhpc/os.h>
#include <cloysterhpc/server.h>

class Headnode : public Server {
public:
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/node.h → include/cloysterhpc/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#include <list>
#include <string>

#include "connection.h"
#include "network.h"
#include "os.h"
#include "server.h"
#include <cloysterhpc/connection.h>
#include <cloysterhpc/network.h>
#include <cloysterhpc/os.h>
#include <cloysterhpc/server.h>

class Node : public Server {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/ofed.h → include/cloysterhpc/ofed.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_OFED_H_
#define CLOYSTERHPC_OFED_H_

#include "functions.h"
#include <cloysterhpc/functions.h>

class OFED {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/os.h → include/cloysterhpc/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_OS_H_
#define CLOYSTERHPC_OS_H_

#include "const.h"
#include <cloysterhpc/const.h>
#include <string>

// Darwin added for development reasons, not really supported.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#ifndef CLOYSTERHPC_PRESENTER_H_
#define CLOYSTERHPC_PRESENTER_H_

#include "../cluster.h"
#include "../services/log.h"
#include "../view/newt.h"
#include <array>
#include <cloysterhpc/cluster.h>
#include <cloysterhpc/services/log.h>
#include <cloysterhpc/view/newt.h>
#include <memory>
#include <string>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_PRESENTERGENERALSETTINGS_H_
#define CLOYSTERHPC_PRESENTERGENERALSETTINGS_H_

#include "Presenter.h"
#include <cloysterhpc/presenter/Presenter.h>

class PresenterGeneralSettings : public Presenter {
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_PRESENTERHOSTID_H_
#define CLOYSTERHPC_PRESENTERHOSTID_H_

#include "Presenter.h"
#include <cloysterhpc/presenter/Presenter.h>

class PresenterHostId : public Presenter {
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#ifndef CLOYSTERHPC_PRESENTERINFINIBAND_H_
#define CLOYSTERHPC_PRESENTERINFINIBAND_H_

#include "Presenter.h"
#include "PresenterNetwork.h"
#include <cloysterhpc/presenter/Presenter.h>
#include <cloysterhpc/presenter/PresenterNetwork.h>

class PresenterInfiniband : public Presenter {
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_PRESENTERINSTALL_H_
#define CLOYSTERHPC_PRESENTERINSTALL_H_

#include "Presenter.h"
#include <cloysterhpc/presenter/Presenter.h>

#include <boost/lexical_cast.hpp>
#include <magic_enum.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_PRESENTERINSTRUCTIONS_H_
#define CLOYSTERHPC_PRESENTERINSTRUCTIONS_H_

#include "Presenter.h"
#include <cloysterhpc/presenter/Presenter.h>

class PresenterInstructions : public Presenter {
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_PRESENTERLOCALE_H_
#define CLOYSTERHPC_PRESENTERLOCALE_H_

#include "Presenter.h"
#include <cloysterhpc/presenter/Presenter.h>

class PresenterLocale : public Presenter {
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_PRESENTERMAILSYSTEM_H_
#define CLOYSTERHPC_PRESENTERMAILSYSTEM_H_

#include "Presenter.h"
#include <cloysterhpc/presenter/Presenter.h>

class PresenterMailSystem : public Presenter {
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
#ifndef CLOYSTERHPC_PRESENTERNETWORK_H_
#define CLOYSTERHPC_PRESENTERNETWORK_H_

#include "Presenter.h"
#include <cloysterhpc/presenter/Presenter.h>

#include "../cluster.h"
#include "../network.h"
#include "../services/log.h"
#include "../view/newt.h"
#include <cloysterhpc/cluster.h>
#include <cloysterhpc/network.h>
#include <cloysterhpc/services/log.h>
#include <cloysterhpc/view/newt.h>

#include <magic_enum.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_PRESENTERNODES_H_
#define CLOYSTERHPC_PRESENTERNODES_H_

#include "Presenter.h"
#include <cloysterhpc/presenter/Presenter.h>

class PresenterNodes : public Presenter {
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef CLOYSTERHPC_PRESENTERNODESOPERATIONALSYSTEM_H_
#define CLOYSTERHPC_PRESENTERNODESOPERATIONALSYSTEM_H_

#include "Presenter.h"
#include <cloysterhpc/presenter/Presenter.h>

class PresenterNodesOperationalSystem : public Presenter {
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_PRESENTERQUEUESYSTEM_H_
#define CLOYSTERHPC_PRESENTERQUEUESYSTEM_H_

#include "Presenter.h"
#include <cloysterhpc/presenter/Presenter.h>

class PresenterQueueSystem : public Presenter {
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_PRESENTERTIMEZONE_H_
#define CLOYSTERHPC_PRESENTERTIMEZONE_H_

#include "Presenter.h"
#include <cloysterhpc/presenter/Presenter.h>

class PresenterTime : public Presenter {
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#ifndef CLOYSTERHPC_PRESENTERWELCOME_H_
#define CLOYSTERHPC_PRESENTERWELCOME_H_

#include "../const.h"
#include "Presenter.h"
#include <cloysterhpc/const.h>
#include <cloysterhpc/presenter/Presenter.h>

class PresenterWelcome : public Presenter {
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_PBS_H_
#define CLOYSTERHPC_PBS_H_

#include "queuesystem.h"
#include <cloysterhpc/queuesystem/queuesystem.h>

class PBS : public QueueSystem {
public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <fmt/format.h>
#include <string>

#include "../functions.h"
#include <cloysterhpc/functions.h>

// Forward declaration of Cluster
class Cluster;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_SLURM_H_
#define CLOYSTERHPC_SLURM_H_

#include "queuesystem.h"
#include <cloysterhpc/queuesystem/queuesystem.h>

class SLURM : public QueueSystem {
private:
Expand Down
2 changes: 1 addition & 1 deletion src/repos.h → include/cloysterhpc/repos.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_REPOS_H_
#define CLOYSTERHPC_REPOS_H_

#include "os.h"
#include <cloysterhpc/os.h>
#include <string>

struct repofile {
Expand Down
8 changes: 4 additions & 4 deletions src/server.h → include/cloysterhpc/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#include <regex>
#include <string>

#include "connection.h"
#include "cpu.h"
#include "os.h"
#include "services/bmc.h"
#include <cloysterhpc/connection.h>
#include <cloysterhpc/cpu.h>
#include <cloysterhpc/os.h>
#include <cloysterhpc/services/bmc.h>

class Server {
protected:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <string>

#include "../cluster.h"
#include <cloysterhpc/cluster.h>

class Execution {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/services/log.h → include/cloysterhpc/services/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef CLOYSTERHPC_LOG_H_
#define CLOYSTERHPC_LOG_H_

#include "../const.h"
#include <cloysterhpc/const.h>
#include <spdlog/spdlog.h>

// Define breakpoints per OS in case of custom assertion failures
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/services/shell.h → include/cloysterhpc/services/shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#include <magic_enum.hpp>

#include "../cluster.h"
#include "execution.h"
#include "provisioner.h"
#include <cloysterhpc/cluster.h>
#include <cloysterhpc/services/execution.h>
#include <cloysterhpc/services/provisioner.h>

class Shell : public Execution {
private:
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions src/services/xcat.h → include/cloysterhpc/services/xcat.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
#ifndef CLOYSTERHPC_XCAT_H_
#define CLOYSTERHPC_XCAT_H_

#include "../const.h"
#include "../services/log.h"
#include "execution.h"
#include "provisioner.h"
#include "shell.h"
#include <cloysterhpc/const.h>
#include <cloysterhpc/services/execution.h>
#include <cloysterhpc/services/log.h>
#include <cloysterhpc/services/provisioner.h>
#include <cloysterhpc/services/shell.h>

#include <magic_enum.hpp>

Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/view/newt.h → include/cloysterhpc/view/newt.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#ifndef CLOYSTERHPC_NEWT_H_
#define CLOYSTERHPC_NEWT_H_

#include "../functions.h"
#include "../services/log.h"
#include "view.h"
#include <boost/lexical_cast.hpp>
#include <cloysterhpc/functions.h>
#include <cloysterhpc/services/log.h>
#include <cloysterhpc/view/view.h>
#include <fmt/format.h>
#include <iostream>
#include <newt.h>
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ target_include_directories(main ${WARNING_GUARD} PRIVATE $<BUILD_INTERFACE:${PRO
# LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/lib"
# RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
#)

6 changes: 3 additions & 3 deletions src/NFS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "NFS.h"
#include "const.h"
#include "functions.h"
#include <cloysterhpc/NFS.h>
#include <cloysterhpc/const.h>
#include <cloysterhpc/functions.h>
#include <fmt/format.h>

using cloyster::runCommand;
Expand Down
Loading

0 comments on commit 7dfe912

Please sign in to comment.