diff options
author | llnulldisk <48621230+llnulldisk@users.noreply.github.com> | 2022-09-30 17:46:58 +0200 |
---|---|---|
committer | llnulldisk <48621230+llnulldisk@users.noreply.github.com> | 2022-09-30 17:46:58 +0200 |
commit | 70b02c460b55f6a6722a852704ee7d916c48ed47 (patch) | |
tree | 6b9134d703edcc2e173ad3218daac1b3ecd4e6a1 /samples | |
parent | d9dfa73edda127580e0961c89d8fafa56735f672 (diff) |
Update docker files and CMakeLists
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..d9347a5 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.13.4) 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..e6c63eb 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.13.4) +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..8561602 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.13.4) 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..ca56c53 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.13.4) 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..26897b6 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.13.4) 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..76ea949 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.13.4) 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..6885bf7 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.13.4) 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..d1f08d3 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.13.4) 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..845b038 --- /dev/null +++ b/samples/reply-keyboard/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.13.4) +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 |