diff options
author | Oleg Morozenkov <o.morozenkov@corp.mail.ru> | 2022-11-01 19:43:42 +0300 |
---|---|---|
committer | Oleg Morozenkov <o.morozenkov@corp.mail.ru> | 2022-11-01 19:43:42 +0300 |
commit | e96d3a3d4f023dc0d5d4e60fb8efb5a40ce7a71d (patch) | |
tree | f57f44b1448204120229bd83f3654b32e3df79ed /samples | |
parent | 30136601c6755e5d7c2174ebd4ed49595e10a54b (diff) | |
parent | 7abb2509b87ef1344da97ae734211715f291cfa2 (diff) |
Merge remote-tracking branch 'llnulldisk/master' into merge-228
Diffstat (limited to 'samples')
-rw-r--r-- | samples/echobot-curl-client/CMakeLists.txt | 6 | ||||
-rw-r--r-- | samples/echobot-curl-client/Dockerfile | 4 | ||||
-rw-r--r-- | samples/echobot-setmycommands/CMakeLists.txt | 12 | ||||
-rw-r--r-- | samples/echobot-setmycommands/Dockerfile | 4 | ||||
-rw-r--r-- | samples/echobot-submodule/CMakeLists.txt | 6 | ||||
-rw-r--r-- | samples/echobot-submodule/Dockerfile | 4 | ||||
-rw-r--r-- | samples/echobot-webhook-server/CMakeLists.txt | 6 | ||||
-rw-r--r-- | samples/echobot-webhook-server/Dockerfile | 4 | ||||
-rw-r--r-- | samples/echobot/CMakeLists.txt | 6 | ||||
-rw-r--r-- | samples/inline-keyboard/CMakeLists.txt | 6 | ||||
-rw-r--r-- | samples/inline-keyboard/Dockerfile | 2 | ||||
-rw-r--r-- | samples/photo/CMakeLists.txt | 6 | ||||
-rw-r--r-- | samples/received-text-processing/CMakeLists.txt | 6 | ||||
-rw-r--r-- | samples/received-text-processing/Dockerfile | 8 | ||||
-rw-r--r-- | samples/reply-keyboard/CMakeLists.txt | 21 | ||||
-rw-r--r-- | samples/reply-keyboard/Dockerfile | 8 |
16 files changed, 81 insertions, 28 deletions
diff --git a/samples/echobot-curl-client/CMakeLists.txt b/samples/echobot-curl-client/CMakeLists.txt index 75d9c58..74b45c5 100644 --- a/samples/echobot-curl-client/CMakeLists.txt +++ b/samples/echobot-curl-client/CMakeLists.txt @@ -1,7 +1,9 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.10.2) project(echobot-curl-client) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(Boost_USE_MULTITHREADED ON) find_package(Threads REQUIRED) diff --git a/samples/echobot-curl-client/Dockerfile b/samples/echobot-curl-client/Dockerfile index a7aa61a..2954ceb 100644 --- a/samples/echobot-curl-client/Dockerfile +++ b/samples/echobot-curl-client/Dockerfile @@ -1,8 +1,8 @@ FROM reo7sp/tgbot-cpp MAINTAINER Oleg Morozenkov <a@reo7sp.ru> -WORKDIR /usr/src/echobot +WORKDIR /usr/src/echobot-curl-client COPY . . RUN cmake . RUN make -j4 -CMD ./echobot +CMD ./echobot-curl-client diff --git a/samples/echobot-setmycommands/CMakeLists.txt b/samples/echobot-setmycommands/CMakeLists.txt index 7019e8f..f8d4ad2 100644 --- a/samples/echobot-setmycommands/CMakeLists.txt +++ b/samples/echobot-setmycommands/CMakeLists.txt @@ -1,7 +1,9 @@ -cmake_minimum_required(VERSION 2.8.4) -project(echobot) +cmake_minimum_required(VERSION 3.10.2) +project(echobot-setmycommands) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(Boost_USE_MULTITHREADED ON) find_package(Threads REQUIRED) @@ -14,6 +16,6 @@ if (CURL_FOUND) add_definitions(-DHAVE_CURL) endif() -add_executable(echobot src/main.cpp) +add_executable(echobot-setmycommands src/main.cpp) -target_link_libraries(echobot /usr/local/lib/libTgBot.a ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} ${Boost_LIBRARIES} ${CURL_LIBRARIES}) +target_link_libraries(echobot-setmycommands /usr/local/lib/libTgBot.a ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} ${Boost_LIBRARIES} ${CURL_LIBRARIES}) diff --git a/samples/echobot-setmycommands/Dockerfile b/samples/echobot-setmycommands/Dockerfile index a7aa61a..c103a7d 100644 --- a/samples/echobot-setmycommands/Dockerfile +++ b/samples/echobot-setmycommands/Dockerfile @@ -1,8 +1,8 @@ FROM reo7sp/tgbot-cpp MAINTAINER Oleg Morozenkov <a@reo7sp.ru> -WORKDIR /usr/src/echobot +WORKDIR /usr/src/echobot-setmycommands COPY . . RUN cmake . RUN make -j4 -CMD ./echobot +CMD ./echobot-setmycommands diff --git a/samples/echobot-submodule/CMakeLists.txt b/samples/echobot-submodule/CMakeLists.txt index fbb9087..e7a16f1 100644 --- a/samples/echobot-submodule/CMakeLists.txt +++ b/samples/echobot-submodule/CMakeLists.txt @@ -1,7 +1,9 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.10.2) project(echobot-submodule) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(Boost_USE_MULTITHREADED ON) find_package(Threads REQUIRED) diff --git a/samples/echobot-submodule/Dockerfile b/samples/echobot-submodule/Dockerfile index a7aa61a..5e5191a 100644 --- a/samples/echobot-submodule/Dockerfile +++ b/samples/echobot-submodule/Dockerfile @@ -1,8 +1,8 @@ FROM reo7sp/tgbot-cpp MAINTAINER Oleg Morozenkov <a@reo7sp.ru> -WORKDIR /usr/src/echobot +WORKDIR /usr/src/echobot-submodule COPY . . RUN cmake . RUN make -j4 -CMD ./echobot +CMD ./echobot-submodule diff --git a/samples/echobot-webhook-server/CMakeLists.txt b/samples/echobot-webhook-server/CMakeLists.txt index 49bcef1..3f4e8b8 100644 --- a/samples/echobot-webhook-server/CMakeLists.txt +++ b/samples/echobot-webhook-server/CMakeLists.txt @@ -1,7 +1,9 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.10.2) project(echobot-webhook-server) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(Boost_USE_MULTITHREADED ON) find_package(Threads REQUIRED) diff --git a/samples/echobot-webhook-server/Dockerfile b/samples/echobot-webhook-server/Dockerfile index a7aa61a..2aa4048 100644 --- a/samples/echobot-webhook-server/Dockerfile +++ b/samples/echobot-webhook-server/Dockerfile @@ -1,8 +1,8 @@ FROM reo7sp/tgbot-cpp MAINTAINER Oleg Morozenkov <a@reo7sp.ru> -WORKDIR /usr/src/echobot +WORKDIR /usr/src/echobot-webhook-server COPY . . RUN cmake . RUN make -j4 -CMD ./echobot +CMD ./echobot-webhook-server diff --git a/samples/echobot/CMakeLists.txt b/samples/echobot/CMakeLists.txt index 7019e8f..20f5297 100644 --- a/samples/echobot/CMakeLists.txt +++ b/samples/echobot/CMakeLists.txt @@ -1,7 +1,9 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.10.2) project(echobot) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(Boost_USE_MULTITHREADED ON) find_package(Threads REQUIRED) diff --git a/samples/inline-keyboard/CMakeLists.txt b/samples/inline-keyboard/CMakeLists.txt index fe7c9bd..01d8718 100644 --- a/samples/inline-keyboard/CMakeLists.txt +++ b/samples/inline-keyboard/CMakeLists.txt @@ -1,7 +1,9 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.10.2) project(inline-keyboard) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(Boost_USE_MULTITHREADED ON) find_package(Threads REQUIRED) diff --git a/samples/inline-keyboard/Dockerfile b/samples/inline-keyboard/Dockerfile index a65d5a1..7e8e97a 100644 --- a/samples/inline-keyboard/Dockerfile +++ b/samples/inline-keyboard/Dockerfile @@ -4,5 +4,5 @@ MAINTAINER Oleg Morozenkov <a@reo7sp.ru> WORKDIR /usr/src/inline-keyboard COPY . . RUN cmake . -RUN make +RUN make -j4 CMD ./inline-keyboard diff --git a/samples/photo/CMakeLists.txt b/samples/photo/CMakeLists.txt index ae4b2eb..a4edadc 100644 --- a/samples/photo/CMakeLists.txt +++ b/samples/photo/CMakeLists.txt @@ -1,7 +1,9 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.10.2) project(photo) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(Boost_USE_MULTITHREADED ON) find_package(Threads REQUIRED) diff --git a/samples/received-text-processing/CMakeLists.txt b/samples/received-text-processing/CMakeLists.txt index 2e351d1..a6bc7dd 100644 --- a/samples/received-text-processing/CMakeLists.txt +++ b/samples/received-text-processing/CMakeLists.txt @@ -1,7 +1,9 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.10.2) project(received-text-processing) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(Boost_USE_MULTITHREADED ON) find_package(Threads REQUIRED) diff --git a/samples/received-text-processing/Dockerfile b/samples/received-text-processing/Dockerfile new file mode 100644 index 0000000..004c09f --- /dev/null +++ b/samples/received-text-processing/Dockerfile @@ -0,0 +1,8 @@ +FROM reo7sp/tgbot-cpp +MAINTAINER Oleg Morozenkov <a@reo7sp.ru> + +WORKDIR /usr/src/received-text-processing +COPY . . +RUN cmake . +RUN make -j4 +CMD ./received-text-processing diff --git a/samples/reply-keyboard/CMakeLists.txt b/samples/reply-keyboard/CMakeLists.txt new file mode 100644 index 0000000..4510692 --- /dev/null +++ b/samples/reply-keyboard/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.10.2) +project(reply-keyboard) + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +set(Boost_USE_MULTITHREADED ON) + +find_package(Threads REQUIRED) +find_package(OpenSSL REQUIRED) +find_package(Boost COMPONENTS system REQUIRED) +find_package(CURL) +include_directories(/usr/local/include ${OPENSSL_INCLUDE_DIR} ${Boost_INCLUDE_DIR}) +if (CURL_FOUND) + include_directories(${CURL_INCLUDE_DIRS}) + add_definitions(-DHAVE_CURL) +endif() + +add_executable(reply-keyboard src/main.cpp) + +target_link_libraries(reply-keyboard /usr/local/lib/libTgBot.a ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} ${Boost_LIBRARIES} ${CURL_LIBRARIES}) diff --git a/samples/reply-keyboard/Dockerfile b/samples/reply-keyboard/Dockerfile new file mode 100644 index 0000000..712e200 --- /dev/null +++ b/samples/reply-keyboard/Dockerfile @@ -0,0 +1,8 @@ +FROM reo7sp/tgbot-cpp +MAINTAINER Oleg Morozenkov <a@reo7sp.ru> + +WORKDIR /usr/src/reply-keyboard +COPY . . +RUN cmake . +RUN make -j4 +CMD ./reply-keyboard |