Skip to content

Commit

Permalink
fixed make install, close #335 (#354)
Browse files Browse the repository at this point in the history
* moved files inside include folder into include/

* fixed relative header link in include/CXXGraph folder

* fixed relative header link in examples folder

* fixed relative header link in test folder

* fixed relative header link in benchmark folder

* fixed relative path to CXXGraphConfig.h file in CMakeLists
  • Loading branch information
AryanGitHub committed Sep 28, 2023
1 parent 6a13044 commit 31ac919
Show file tree
Hide file tree
Showing 94 changed files with 141 additions and 158 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.9)
# set the project name and version
project(CXXGraph VERSION 2.0.0)

configure_file(CXXGraphConfig.h.in ${PROJECT_SOURCE_DIR}/include/CXXGraphConfig.h)
configure_file(CXXGraphConfig.h.in ${PROJECT_SOURCE_DIR}/include/CXXGraph/CXXGraphConfig.h)

# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
Expand Down Expand Up @@ -41,3 +41,4 @@ add_subdirectory(benchmark)
add_subdirectory(examples)

#install(FILES include/Graph.hpp DESTINATION /usr/include)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include)
2 changes: 1 addition & 1 deletion benchmark/BFS_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void BFS_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/BellmanFord_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void BellmanFord_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Boruvka_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void Boruvka_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Connectivity_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void Connectivity_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/CycleCheck_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void CycleCheckBFS_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/DFS_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void DFS_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Dial_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void Dial_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Dijkstra_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void Dijkstra_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Edge_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void BM_EdgeCreation(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/EulerPath_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void EulerPath_X(benchmark::State &state) {
Expand Down
3 changes: 1 addition & 2 deletions benchmark/FloydWarshall_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include <benchmark/benchmark.h>
#include <Edge/DirectedWeightedEdge.hpp>
#include <memory>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

using std::make_shared;
Expand Down
2 changes: 1 addition & 1 deletion benchmark/FordFulkerson_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void FordFulkerson_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/GraphSlicing_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void GraphSlicing_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Graph_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

// static CXXGraph::Graph<int> *graph;
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Kruskal_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void Kruskal_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Node_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void NodeCreation(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Partition_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void PartitionHDRF_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Prim_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void Prim_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/TopologicalSort_BM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <benchmark/benchmark.h>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"
#include "Utilities.hpp"

static void TopologicalSort_X(benchmark::State &state) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <random>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"

static std::map<unsigned long, CXXGraph::Node<int> *> generateRandomNodes(
unsigned long numberOfNodes, int MaxValue) {
Expand Down
2 changes: 1 addition & 1 deletion examples/DialExample/dial_example.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <math.h>
#include <memory>

#include <CXXGraph.hpp>
#include <CXXGraph/CXXGraph.hpp>

using std::make_shared;

Expand Down
2 changes: 1 addition & 1 deletion examples/DijkstraExample/dijkstra_example.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <CXXGraph.hpp>
#include <CXXGraph/CXXGraph.hpp>

#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion examples/PartitionExample/partition_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <iterator>

#include "CXXGraph.hpp"
#include "CXXGraph/CXXGraph.hpp"

static CXXGraph::Graph<int> *readGraph(const std::string &filename) {
CXXGraph::Graph<int> *graph_ptr = new CXXGraph::Graph<int>();
Expand Down
28 changes: 0 additions & 28 deletions include/CXXGraph.hpp

This file was deleted.

28 changes: 28 additions & 0 deletions include/CXXGraph/CXXGraph.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef __CXXGRAPH_H__
#define __CXXGRAPH_H__

#include "CXXGraph/CXXGraphConfig.h"
#include "CXXGraph/Edge/DirectedEdge.hpp"
#include "CXXGraph/Edge/DirectedWeightedEdge.hpp"
#include "CXXGraph/Edge/Edge.hpp"
#include "CXXGraph/Edge/UndirectedEdge.hpp"
#include "CXXGraph/Edge/UndirectedWeightedEdge.hpp"
#include "CXXGraph/Edge/Weighted.hpp"
#include "CXXGraph/Graph/Graph.hpp"
#include "CXXGraph/Node/Node.hpp"
#include "CXXGraph/Partitioning/CoordinatedPartitionState.hpp"
#include "CXXGraph/Partitioning/CoordinatedRecord.hpp"
#include "CXXGraph/Partitioning/EBV.hpp"
#include "CXXGraph/Partitioning/EdgeBalancedVertexCut.hpp"
#include "CXXGraph/Partitioning/GreedyVertexCut.hpp"
#include "CXXGraph/Partitioning/HDRF.hpp"
#include "CXXGraph/Partitioning/Partition.hpp"
#include "CXXGraph/Partitioning/PartitionAlgorithm.hpp"
#include "CXXGraph/Partitioning/PartitionState.hpp"
#include "CXXGraph/Partitioning/PartitionStrategy.hpp"
#include "CXXGraph/Partitioning/Partitioner.hpp"
#include "CXXGraph/Partitioning/PartitionerThread.hpp"
#include "CXXGraph/Partitioning/PartitioningStats.hpp"
#include "CXXGraph/Partitioning/Record.hpp"

#endif // __CXXGRAPH_H__
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions include/Edge/Edge.hpp → include/CXXGraph/Edge/Edge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#include <optional>
#include <utility>

#include "Node/Node.hpp"
#include "Utility/id_t.hpp"
#include "CXXGraph/Node/Node.hpp"
#include "CXXGraph/Utility/id_t.hpp"

namespace CXXGraph {
// Smart pointers alias
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 18 additions & 18 deletions include/Graph/Graph.hpp → include/CXXGraph/Graph/Graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,24 @@
#include <unordered_set>
#include <utility>

#include "Edge/DirectedEdge.hpp"
#include "Edge/DirectedWeightedEdge.hpp"
#include "Edge/Edge.hpp"
#include "Edge/UndirectedEdge.hpp"
#include "Edge/UndirectedWeightedEdge.hpp"
#include "Edge/Weighted.hpp"
#include "Node/Node.hpp"
#include "Partitioning/Partition.hpp"
#include "Partitioning/PartitionAlgorithm.hpp"
#include "Partitioning/Partitioner.hpp"
#include "Partitioning/Utility/Globals.hpp"
#include "Utility/ConstString.hpp"
#include "Utility/ConstValue.hpp"
#include "Utility/PointerHash.hpp"
#include "Utility/Reader.hpp"
#include "Utility/ThreadSafe.hpp"
#include "Utility/Typedef.hpp"
#include "Utility/Writer.hpp"
#include "CXXGraph/Edge/DirectedEdge.hpp"
#include "CXXGraph/Edge/DirectedWeightedEdge.hpp"
#include "CXXGraph/Edge/Edge.hpp"
#include "CXXGraph/Edge/UndirectedEdge.hpp"
#include "CXXGraph/Edge/UndirectedWeightedEdge.hpp"
#include "CXXGraph/Edge/Weighted.hpp"
#include "CXXGraph/Node/Node.hpp"
#include "CXXGraph/Partitioning/Partition.hpp"
#include "CXXGraph/Partitioning/PartitionAlgorithm.hpp"
#include "CXXGraph/Partitioning/Partitioner.hpp"
#include "CXXGraph/Partitioning/Utility/Globals.hpp"
#include "CXXGraph/Utility/ConstString.hpp"
#include "CXXGraph/Utility/ConstValue.hpp"
#include "CXXGraph/Utility/PointerHash.hpp"
#include "CXXGraph/Utility/Reader.hpp"
#include "CXXGraph/Utility/ThreadSafe.hpp"
#include "CXXGraph/Utility/Typedef.hpp"
#include "CXXGraph/Utility/Writer.hpp"

#ifdef WITH_COMPRESSION
#include <zlib.h>
Expand Down
2 changes: 1 addition & 1 deletion include/Node/Node.hpp → include/CXXGraph/Node/Node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#pragma once

#include "Utility/id_t.hpp"
#include "CXXGraph/Utility/id_t.hpp"

#include <iomanip>
#include <iostream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#include <vector>

#include "CoordinatedRecord.hpp"
#include "Edge/Edge.hpp"
#include "CXXGraph/Edge/Edge.hpp"
#include "PartitionState.hpp"
#include "Partitioning/Utility/Globals.hpp"
#include "CXXGraph/Partitioning/Utility/Globals.hpp"
#include "Record.hpp"

namespace CXXGraph {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <set>

#include "Record.hpp"
#include "Utility/Typedef.hpp"
#include "CXXGraph/Utility/Typedef.hpp"

namespace CXXGraph {
namespace Partitioning {
Expand Down Expand Up @@ -142,4 +142,4 @@ void CoordinatedRecord<T>::addAll(const std::set<int> &set) {
} // namespace Partitioning
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITIONING_COORDINATEDRECORD_H__
#endif // __CXXGRAPH_PARTITIONING_COORDINATEDRECORD_H__
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#include <chrono>
#include <unordered_map>

#include "Edge/Edge.hpp"
#include "CXXGraph/Edge/Edge.hpp"
#include "PartitionStrategy.hpp"
#include "Partitioning/Utility/Globals.hpp"
#include "CXXGraph/Partitioning/Utility/Globals.hpp"

namespace CXXGraph {
// Smart pointers alias
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

#include <chrono>

#include "Edge/Edge.hpp"
#include "CXXGraph/Edge/Edge.hpp"
#include "PartitionStrategy.hpp"
#include "Partitioning/Utility/Globals.hpp"
#include "CXXGraph/Partitioning/Utility/Globals.hpp"

namespace CXXGraph {
// Smart pointers alias
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#include <chrono>
#include <random>

#include "Edge/Edge.hpp"
#include "CXXGraph/Edge/Edge.hpp"
#include "PartitionStrategy.hpp"
#include "Partitioning/Utility/Globals.hpp"
#include "CXXGraph/Partitioning/Utility/Globals.hpp"

namespace CXXGraph {
// Smart pointers alias
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#include <chrono>
#include <random>

#include "Edge/Edge.hpp"
#include "CXXGraph/Edge/Edge.hpp"
#include "PartitionStrategy.hpp"
#include "Partitioning/Utility/Globals.hpp"
#include "CXXGraph/Partitioning/Utility/Globals.hpp"

namespace CXXGraph {
// Smart pointers alias
Expand Down
Loading

0 comments on commit 31ac919

Please sign in to comment.