aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/server/lexer
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-10-17 18:38:17 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-10-17 18:38:17 +0300
commit6cce85b3a34a4a27d678abf0b4c005a38afd1738 (patch)
treef0c699f6f92b59e7e6613a30c8dd0e3ce3585540 /server/lexer
parentupdate cmake-common (diff)
downloadmath-server-6cce85b3a34a4a27d678abf0b4c005a38afd1738.tar.gz
math-server-6cce85b3a34a4a27d678abf0b4c005a38afd1738.zip
cmake: no more target_include_directories hacks
Diffstat (limited to 'server/lexer')
-rw-r--r--server/lexer/CMakeLists.txt2
-rw-r--r--server/lexer/details/parse.cpp4
-rw-r--r--server/lexer/error.hpp2
-rw-r--r--server/lexer/lexer.cpp11
-rw-r--r--server/lexer/token.cpp7
-rw-r--r--server/lexer/token_type.cpp5
6 files changed, 15 insertions, 16 deletions
diff --git a/server/lexer/CMakeLists.txt b/server/lexer/CMakeLists.txt
index 64375e8..fffb5a3 100644
--- a/server/lexer/CMakeLists.txt
+++ b/server/lexer/CMakeLists.txt
@@ -1,6 +1,8 @@
file(GLOB_RECURSE lexer_cpp "*.cpp")
file(GLOB_RECURSE lexer_hpp "*.hpp")
add_library(lexer ${lexer_cpp} ${lexer_hpp})
+target_include_directories(lexer PUBLIC ..)
+
target_link_libraries(lexer PUBLIC common)
find_package(Boost REQUIRED COMPONENTS regex)
diff --git a/server/lexer/details/parse.cpp b/server/lexer/details/parse.cpp
index ccabb7e..3844225 100644
--- a/server/lexer/details/parse.cpp
+++ b/server/lexer/details/parse.cpp
@@ -3,8 +3,8 @@
// For details, see https://github.com/egor-tensin/math-server.
// Distributed under the MIT License.
-#include "../error.hpp"
-#include "../token_type.hpp"
+#include <lexer/error.hpp>
+#include <lexer/token_type.hpp>
#include <boost/regex.hpp>
diff --git a/server/lexer/error.hpp b/server/lexer/error.hpp
index 72b3caa..994309a 100644
--- a/server/lexer/error.hpp
+++ b/server/lexer/error.hpp
@@ -5,7 +5,7 @@
#pragma once
-#include "../common/error.hpp"
+#include <common/error.hpp>
#include <string>
diff --git a/server/lexer/lexer.cpp b/server/lexer/lexer.cpp
index 9b4e500..9d3c362 100644
--- a/server/lexer/lexer.cpp
+++ b/server/lexer/lexer.cpp
@@ -3,12 +3,11 @@
// For details, see https://github.com/egor-tensin/math-server.
// Distributed under the MIT License.
-#include "lexer.hpp"
-
-#include "details/parse.hpp"
-#include "error.hpp"
-#include "token.hpp"
-#include "token_type.hpp"
+#include <lexer/details/parse.hpp>
+#include <lexer/error.hpp>
+#include <lexer/lexer.hpp>
+#include <lexer/token.hpp>
+#include <lexer/token_type.hpp>
#include <optional>
#include <string>
diff --git a/server/lexer/token.cpp b/server/lexer/token.cpp
index 5516bde..466012f 100644
--- a/server/lexer/token.cpp
+++ b/server/lexer/token.cpp
@@ -3,10 +3,9 @@
// For details, see https://github.com/egor-tensin/math-server.
// Distributed under the MIT License.
-#include "token.hpp"
-
-#include "error.hpp"
-#include "token_type.hpp"
+#include <lexer/error.hpp>
+#include <lexer/token.hpp>
+#include <lexer/token_type.hpp>
#include <cmath>
#include <limits>
diff --git a/server/lexer/token_type.cpp b/server/lexer/token_type.cpp
index 037a761..858e565 100644
--- a/server/lexer/token_type.cpp
+++ b/server/lexer/token_type.cpp
@@ -3,9 +3,8 @@
// For details, see https://github.com/egor-tensin/math-server.
// Distributed under the MIT License.
-#include "token_type.hpp"
-
-#include "error.hpp"
+#include <lexer/error.hpp>
+#include <lexer/token_type.hpp>
#include <functional>
#include <map>