From 6cce85b3a34a4a27d678abf0b4c005a38afd1738 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 17 Oct 2020 18:38:17 +0300 Subject: cmake: no more target_include_directories hacks --- server/main/CMakeLists.txt | 10 +++++----- server/main/server.cpp | 5 +++-- server/main/session.cpp | 7 ++++--- server/main/session_manager.cpp | 3 ++- 4 files changed, 14 insertions(+), 11 deletions(-) (limited to 'server/main') 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 "$" 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 +#include + #include #include #include 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 +#include +#include + #include #include #include 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 + #include #include -- cgit v1.2.3