|
@@ -14,6 +14,11 @@ else()
|
|
|
message("==> CMAKE_BUILD_TYPE == ${CMAKE_BUILD_TYPE}.")
|
|
|
endif()
|
|
|
|
|
|
+add_definitions("-std=c++11")
|
|
|
+set(Boost_USE_STATIC_LIBS ON)
|
|
|
+include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
|
|
+conan_basic_setup()
|
|
|
+
|
|
|
## set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG -DGLIBCXX_FORCE_NEW")
|
|
|
|
|
|
## https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html
|
|
@@ -30,11 +35,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
set(CMAKE_CXX_EXTENSIONS ON)
|
|
|
|
|
|
-ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
|
|
|
+#ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
|
|
|
|
|
|
# add log_setup log
|
|
|
-FIND_PACKAGE( Boost 1.60 COMPONENTS program_options log_setup log REQUIRED )
|
|
|
-INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
|
|
|
+#FIND_PACKAGE( Boost 1.60 COMPONENTS program_options log_setup log REQUIRED )
|
|
|
+#INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
|
|
|
|
|
|
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp)
|
|
|
message("***")
|
|
@@ -58,11 +63,13 @@ option(gtest_disable_pthreads "Disable uses of pthreads in gtest." OFF)
|
|
|
### TESTS
|
|
|
add_executable(test-galaxy test-galaxy.cpp galaxy.cpp config.cpp utils.cpp buysell.cpp)
|
|
|
add_dependencies(test-galaxy gtest)
|
|
|
-target_link_libraries(test-galaxy gtest_main ${Boost_LIBRARIES} yaml-cpp)
|
|
|
+#target_link_libraries(test-galaxy gtest_main ${Boost_LIBRARIES} yaml-cpp)
|
|
|
+target_link_libraries(test-galaxy gtest_main ${CONAN_LIBS} yaml-cpp)
|
|
|
|
|
|
add_executable(test-director test-director.cpp galaxy.cpp utils.cpp buysell.cpp director.cpp dispatchers.cpp boxes.cpp scripts.cpp config.cpp)
|
|
|
add_dependencies(test-director gtest)
|
|
|
-target_link_libraries(test-director gtest_main ${Boost_LIBRARIES} yaml-cpp)
|
|
|
+#target_link_libraries(test-director gtest_main ${Boost_LIBRARIES} yaml-cpp)
|
|
|
+target_link_libraries(test-director gtest_main ${CONAN_LIBS} yaml-cpp)
|
|
|
|
|
|
enable_testing()
|
|
|
add_test(NAME test-galaxy
|
|
@@ -72,7 +79,8 @@ add_test(NAME test-director
|
|
|
|
|
|
# dispatchers.cpp
|
|
|
ADD_EXECUTABLE( twproxy twproxy.cpp utils.cpp session.cpp boxes.cpp director.cpp galaxy.cpp dispatchers.cpp scripts.cpp buysell.cpp config.cpp)
|
|
|
-TARGET_LINK_LIBRARIES( twproxy ${Boost_LIBRARIES} pthread yaml-cpp)
|
|
|
+#TARGET_LINK_LIBRARIES( twproxy ${Boost_LIBRARIES} pthread yaml-cpp)
|
|
|
+TARGET_LINK_LIBRARIES( twproxy ${CONAN_LIBS} pthread yaml-cpp)
|
|
|
|
|
|
-target_precompile_headers(twproxy PRIVATE pch.hpp)
|
|
|
+#target_precompile_headers(twproxy PRIVATE pch.hpp)
|
|
|
|