Auto-update promise-cpp to 2.1.5 (#4106)
* Update promise-cpp to 2.1.5 * port * fix shared --------- Co-authored-by: star9029 <hengxings783@gmail.com>pull/3905/merge
parent
761483e5a2
commit
61fac16ef3
3 changed files with 24 additions and 98 deletions
@ -1,72 +0,0 @@ |
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fd43e91..5ddef71 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -39,26 +39,6 @@ else()
|
||||
add_library(promise STATIC ${my_sources} ${my_headers})
|
||||
endif()
|
||||
|
||||
-
|
||||
-add_executable(test0 ${my_headers} example/test0.cpp)
|
||||
-target_link_libraries(test0 PRIVATE promise)
|
||||
-
|
||||
-add_executable(simple_timer ${my_headers} example/simple_timer.cpp)
|
||||
-target_link_libraries(simple_timer PRIVATE promise)
|
||||
-
|
||||
-add_executable(simple_benchmark_test ${my_headers} example/simple_benchmark_test.cpp)
|
||||
-target_link_libraries(simple_benchmark_test PRIVATE promise)
|
||||
-
|
||||
-find_package(Threads)
|
||||
-if(Threads_FOUND)
|
||||
- add_executable(multithread_test ${my_headers} example/multithread_test.cpp)
|
||||
- target_link_libraries(multithread_test PRIVATE promise Threads::Threads)
|
||||
-endif()
|
||||
-
|
||||
-add_executable(chain_defer_test ${my_headers} example/chain_defer_test.cpp)
|
||||
-target_link_libraries(chain_defer_test PRIVATE promise)
|
||||
-
|
||||
-
|
||||
find_package(Boost)
|
||||
if(NOT Boost_FOUND)
|
||||
message(WARNING "Boost not found, so asio projects will not be compiled")
|
||||
@@ -70,40 +50,4 @@ else()
|
||||
endif (UNIX)
|
||||
|
||||
include_directories(. ./add_ons/asio)
|
||||
-
|
||||
- add_executable(asio_benchmark_test ${my_headers} example/asio_benchmark_test.cpp)
|
||||
- target_compile_definitions(asio_benchmark_test PRIVATE BOOST_ALL_NO_LIB)
|
||||
- target_link_libraries(asio_benchmark_test PRIVATE promise)
|
||||
-
|
||||
- add_executable(asio_timer ${my_headers} example/asio_timer.cpp)
|
||||
- target_compile_definitions(asio_timer PRIVATE BOOST_ALL_NO_LIB)
|
||||
- target_link_libraries(asio_timer PRIVATE promise)
|
||||
-
|
||||
- add_executable(asio_http_client ${my_headers} example/asio_http_client.cpp)
|
||||
- target_compile_definitions(asio_http_client PRIVATE BOOST_ALL_NO_LIB)
|
||||
- target_link_libraries(asio_http_client PRIVATE promise)
|
||||
-
|
||||
- add_executable(asio_http_server ${my_headers} example/asio_http_server.cpp)
|
||||
- target_compile_definitions(asio_http_server PRIVATE BOOST_ALL_NO_LIB)
|
||||
- target_link_libraries(asio_http_server PRIVATE promise)
|
||||
-endif()
|
||||
-
|
||||
-
|
||||
-find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets)
|
||||
-find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets)
|
||||
-if(NOT QT_DIR)
|
||||
- message(WARNING "QT not found, so project qt_timer will not be compiled")
|
||||
-else()
|
||||
- if(PROMISE_BUILD_SHARED OR BUILD_SHARED_LIBS)
|
||||
- add_library(promise_qt SHARED ./add_ons/qt/promise_qt.cpp ${my_headers})
|
||||
- else()
|
||||
- add_library(promise_qt STATIC ./add_ons/qt/promise_qt.cpp ${my_headers})
|
||||
- endif()
|
||||
- target_link_libraries(promise_qt PRIVATE promise Qt${QT_VERSION_MAJOR}::Widgets)
|
||||
-
|
||||
- add_subdirectory(./example/qt_timer)
|
||||
-endif()
|
||||
-
|
||||
-if(MSVC)
|
||||
- add_subdirectory(./example/mfc_timer)
|
||||
endif()
|
@ -0,0 +1,19 @@ |
||||
option("boost_asio", {showmenu = true, default = false}) |
||||
|
||||
add_rules("mode.debug", "mode.release") |
||||
set_languages("c++11") |
||||
|
||||
if has_config("boost_asio") then |
||||
add_requires("boost") |
||||
add_packages("boost") |
||||
end |
||||
|
||||
target("promise-cpp") |
||||
set_kind("$(kind)") |
||||
add_files("src/*.cpp") |
||||
add_includedirs(".", "include") |
||||
add_headerfiles("include/(**.hpp)", "(add_ons/**.hpp)") |
||||
|
||||
if is_plat("windows") and is_kind("shared") then |
||||
add_defines("PROMISE_BUILD_SHARED") |
||||
end |
Loading…
Reference in new issue