aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/server/main
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/main
parentupdate cmake-common (diff)
downloadmath-server-6cce85b3a34a4a27d678abf0b4c005a38afd1738.tar.gz
math-server-6cce85b3a34a4a27d678abf0b4c005a38afd1738.zip
cmake: no more target_include_directories hacks
Diffstat (limited to 'server/main')
-rw-r--r--server/main/CMakeLists.txt10
-rw-r--r--server/main/server.cpp5
-rw-r--r--server/main/session.cpp7
-rw-r--r--server/main/session_manager.cpp3
4 files changed, 14 insertions, 11 deletions
diff --git a/server/main/CMakeLists.txt b/server/main/CMakeLists.txt
index 39fe0b4..5457c7b 100644
--- a/server/main/CMakeLists.txt
+++ b/server/main/CMakeLists.txt
@@ -3,8 +3,12 @@ option(DEBUG_ASIO "enable debug output for Boost.Asio" OFF)
file(GLOB server_cpp "*.cpp")
file(GLOB server_hpp "*.hpp")
add_executable(server ${server_cpp} ${server_hpp})
-target_link_libraries(server PRIVATE common parser)
set_target_properties(server PROPERTIES OUTPUT_NAME math-server)
+if(DEBUG_ASIO)
+ target_compile_definitions(server PRIVATE BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+endif()
+
+target_link_libraries(server PRIVATE common parser)
set(CMAKE_THREAD_PREFER_PTHREAD ON)
set(THREADS_PREFER_PTHREAD_FLAG ON)
@@ -17,10 +21,6 @@ target_link_libraries(server PRIVATE
Boost::filesystem
Boost::program_options)
-if(DEBUG_ASIO)
- target_compile_definitions(server PRIVATE BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-endif()
-
install(TARGETS server RUNTIME DESTINATION bin)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
install(FILES "$<TARGET_PDB_FILE:server>" DESTINATION bin OPTIONAL)
diff --git a/server/main/server.cpp b/server/main/server.cpp
index 72034b1..a7ff294 100644
--- a/server/main/server.cpp
+++ b/server/main/server.cpp
@@ -5,12 +5,13 @@
#include "server.hpp"
-#include "../common/error.hpp"
-#include "../common/log.hpp"
#include "session.hpp"
#include "session_manager.hpp"
#include "settings.hpp"
+#include <common/error.hpp>
+#include <common/log.hpp>
+
#include <boost/asio.hpp>
#include <boost/system/error_code.hpp>
#include <boost/system/system_error.hpp>
diff --git a/server/main/session.cpp b/server/main/session.cpp
index 3917514..4725c38 100644
--- a/server/main/session.cpp
+++ b/server/main/session.cpp
@@ -5,11 +5,12 @@
#include "session.hpp"
-#include "../common/error.hpp"
-#include "../common/log.hpp"
-#include "../parser/parser.hpp"
#include "session_manager.hpp"
+#include <common/error.hpp>
+#include <common/log.hpp>
+#include <parser/parser.hpp>
+
#include <boost/asio.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/system/error_code.hpp>
diff --git a/server/main/session_manager.cpp b/server/main/session_manager.cpp
index 753750d..89196b6 100644
--- a/server/main/session_manager.cpp
+++ b/server/main/session_manager.cpp
@@ -5,9 +5,10 @@
#include "session_manager.hpp"
-#include "../common/log.hpp"
#include "session.hpp"
+#include <common/log.hpp>
+
#include <memory>
#include <mutex>