From c68c630d16bb6b98376bcc466c1940071a8ed9fb Mon Sep 17 00:00:00 2001
From: "w.klijn" <w.klijn@fz-juelich.de>
Date: Wed, 8 Jun 2016 17:29:48 +0200
Subject: [PATCH] Remove relative includes using /

Add all directories with files to include to CMakeLists.txt
Make all linux folder based includes global (remove the folder structure)
---
 CMakeLists.txt                    | 4 ++++
 src/cell_tree.hpp                 | 2 +-
 src/fvm.hpp                       | 2 +-
 src/indexed_view.hpp              | 2 +-
 src/ion.hpp                       | 2 +-
 src/matrix.hpp                    | 2 +-
 src/mechanism_interface.cpp       | 5 +++--
 src/tree.hpp                      | 2 +-
 src/util.hpp                      | 2 +-
 tests/test_matrix.cpp             | 2 +-
 tests/util.hpp                    | 2 +-
 tests/validate_ball_and_stick.cpp | 2 +-
 12 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ccc56d8a..9764e339 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,9 +15,13 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 
 include_directories(${CMAKE_SOURCE_DIR}/external)
+include_directories(${CMAKE_SOURCE_DIR}/external/vector/include)
+include_directories(${CMAKE_SOURCE_DIR}/external/json/src)
 include_directories(${CMAKE_SOURCE_DIR}/include)
+include_directories(${CMAKE_SOURCE_DIR}/include/mechanisms)
 include_directories(${CMAKE_SOURCE_DIR}/src)
 include_directories(${CMAKE_SOURCE_DIR})
 
 add_subdirectory(src)
 add_subdirectory(tests)
+
diff --git a/src/cell_tree.hpp b/src/cell_tree.hpp
index 43fac242..8827bb01 100644
--- a/src/cell_tree.hpp
+++ b/src/cell_tree.hpp
@@ -9,7 +9,7 @@
 #include <ostream>
 #include <vector>
 
-#include "vector/include/Vector.hpp"
+#include <Vector.hpp>
 #include "tree.hpp"
 #include "util.hpp"
 
diff --git a/src/fvm.hpp b/src/fvm.hpp
index 69d23d0d..f047581e 100644
--- a/src/fvm.hpp
+++ b/src/fvm.hpp
@@ -16,7 +16,7 @@
 #include <segment.hpp>
 #include <stimulus.hpp>
 
-#include <vector/include/Vector.hpp>
+#include <Vector.hpp>
 
 namespace nest {
 namespace mc {
diff --git a/src/indexed_view.hpp b/src/indexed_view.hpp
index 0cbc22a9..01df7e99 100644
--- a/src/indexed_view.hpp
+++ b/src/indexed_view.hpp
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <vector/include/Vector.hpp>
+#include <Vector.hpp>
 
 namespace nest {
 namespace mc {
diff --git a/src/ion.hpp b/src/ion.hpp
index 311e8600..990eefcc 100644
--- a/src/ion.hpp
+++ b/src/ion.hpp
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <vector/include/Vector.hpp>
+#include <Vector.hpp>
 #include "indexed_view.hpp"
 
 namespace nest {
diff --git a/src/matrix.hpp b/src/matrix.hpp
index db9d2df7..fe650190 100644
--- a/src/matrix.hpp
+++ b/src/matrix.hpp
@@ -4,7 +4,7 @@
 
 #include "util.hpp"
 
-#include <vector/include/Vector.hpp>
+#include <Vector.hpp>
 
 namespace nest {
 namespace mc {
diff --git a/src/mechanism_interface.cpp b/src/mechanism_interface.cpp
index 10fad45f..b02d7035 100644
--- a/src/mechanism_interface.cpp
+++ b/src/mechanism_interface.cpp
@@ -4,8 +4,9 @@
 //  include the mechanisms
 //
 
-#include <mechanisms/hh.hpp>
-#include <mechanisms/pas.hpp>
+#include <hh.hpp>
+#include <pas.hpp>
+
 
 namespace nest {
 namespace mc {
diff --git a/src/tree.hpp b/src/tree.hpp
index d517f7e4..72e22e83 100644
--- a/src/tree.hpp
+++ b/src/tree.hpp
@@ -6,7 +6,7 @@
 
 #include <cassert>
 
-#include "vector/include/Vector.hpp"
+#include <Vector.hpp>
 #include "algorithms.hpp"
 #include "util.hpp"
 
diff --git a/src/util.hpp b/src/util.hpp
index afa029ff..25beee5b 100644
--- a/src/util.hpp
+++ b/src/util.hpp
@@ -1,6 +1,6 @@
 #pragma once
 
-#include "vector/include/Vector.hpp"
+#include <Vector.hpp>
 
 #ifdef DEBUG
 #define EXPECTS(expression) assert(expression)
diff --git a/tests/test_matrix.cpp b/tests/test_matrix.cpp
index 73663d68..07738a6c 100644
--- a/tests/test_matrix.cpp
+++ b/tests/test_matrix.cpp
@@ -4,7 +4,7 @@
 
 #include <matrix.hpp>
 #include <math.hpp>
-#include <vector/include/Vector.hpp>
+#include <Vector.hpp>
 
 TEST(matrix, construct_from_parent_only)
 {
diff --git a/tests/util.hpp b/tests/util.hpp
index aeb2f8d3..bdc21531 100644
--- a/tests/util.hpp
+++ b/tests/util.hpp
@@ -8,7 +8,7 @@
 #include <cmath>
 
 #include <util.hpp>
-#include <json/src/json.hpp>
+#include <json.hpp>
 
 // helpful code for running tests
 // a bit messy: refactor when it gets heavier and obvious patterns emerge...
diff --git a/tests/validate_ball_and_stick.cpp b/tests/validate_ball_and_stick.cpp
index a2aef0ad..6e8098bd 100644
--- a/tests/validate_ball_and_stick.cpp
+++ b/tests/validate_ball_and_stick.cpp
@@ -6,7 +6,7 @@
 #include <cell.hpp>
 #include <fvm.hpp>
 
-#include <json/src/json.hpp>
+#include <json.hpp>
 
 // compares results with those generated by nrn/ball_and_stick.py
 TEST(ball_and_stick, neuron_baseline)
-- 
GitLab