Skip to content

Commit

Permalink
merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppeM99 committed Sep 22, 2021
2 parents 6bb6893 + 36b0c44 commit 97872f5
Show file tree
Hide file tree
Showing 10 changed files with 182 additions and 147 deletions.
24 changes: 23 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ if (POLICY CMP0065)
cmake_policy(SET CMP0065 NEW)
endif()

project(TelegramBotApi VERSION 5.3.1 LANGUAGES CXX)
project(TelegramBotApi VERSION 5.3.3 LANGUAGES CXX)

if (POLICY CMP0069)
option(TELEGRAM_BOT_API_ENABLE_LTO "Use \"ON\" to enable Link Time Optimization.")
set(TD_ENABLE_LTO "${TELEGRAM_BOT_API_ENABLE_LTO}" CACHE STRING "Enable LTO" FORCE)
endif()

add_subdirectory(td EXCLUDE_FROM_ALL)

Expand All @@ -27,10 +32,27 @@ if (POLICY CMP0060)
# link libraries by full path
cmake_policy(SET CMP0060 NEW)
endif()
if (POLICY CMP0074)
# use environment variables to find libraries
cmake_policy(SET CMP0074 NEW)
endif()

include(PreventInSourceBuild)
prevent_in_source_build()

if (POLICY CMP0069 AND TELEGRAM_BOT_API_ENABLE_LTO)
cmake_policy(SET CMP0069 NEW)
include(CheckIPOSupported)
check_ipo_supported(RESULT IPO_SUPPORTED LANGUAGES CXX)
if (IPO_SUPPORTED)
string(REPLACE ";" " " CXX_FLAGS_IPO "${CMAKE_CXX_COMPILE_OPTIONS_IPO}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAGS_IPO}")

string(REPLACE ";" " " LINK_FLAGS_IPO "${CMAKE_CXX_LINK_OPTIONS_IPO}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LINK_FLAGS_IPO}")
endif()
endif()

set(CMAKE_THREAD_PREFER_PTHREAD ON)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
Expand Down
19 changes: 8 additions & 11 deletions build.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@
<option>Alpine</option>
<option>CentOS 7</option>
<option>CentOS 8</option>
<option>Debian 8</option>
<option>Debian 9</option>
<option>Debian 10</option>
<option>Debian 8/9</option>
<option>Debian 10+</option>
<option>Ubuntu 14</option>
<option>Ubuntu 16</option>
<option>Ubuntu 18</option>
Expand Down Expand Up @@ -249,7 +248,6 @@
pre_text.push('Download and install <a href="https://visualstudio.microsoft.com/ru/vs/community/">Microsoft Visual Studio</a>. Enable C++ support while installing.');
pre_text.push('Download and install <a href="https://cmake.org/download/">CMake</a>; choose "Add CMake to the system PATH" option while installing.');
pre_text.push('Download and install <a href="https://git-scm.com/download/win">Git</a>.');
pre_text.push('Download and install <a href="https://sourceforge.net/projects/gnuwin32/files/gperf/3.0.1/">gperf</a>. Add the path to gperf.exe to the PATH environment variable.');
}
if (os_linux && linux_distro === 'Other') {
var compiler = use_clang ? 'clang >= 3.4' : 'g++ >= 4.9.2';
Expand Down Expand Up @@ -334,14 +332,13 @@
cmake = 'cmake3';
packages += ' gperf';
} else {
commands.push(sudo + 'dnf --enablerepo=PowerTools install gperf');
commands.push(sudo + 'dnf --enablerepo=powertools install gperf');
}
packages += ' ' + cmake;
commands.push(sudo + 'yum install -y ' + packages);
break;
case 'Debian 8':
case 'Debian 9':
case 'Debian 10':
case 'Debian 8/9':
case 'Debian 10+':
case 'Ubuntu 14':
case 'Ubuntu 16':
case 'Ubuntu 18':
Expand All @@ -362,7 +359,7 @@
}
if (use_clang) {
packages += ' clang' + getClangVersionSuffix() + ' libc++-dev';
if (linux_distro === 'Debian 10' || linux_distro === 'Ubuntu 18' || linux_distro === 'Ubuntu 20') {
if (linux_distro === 'Debian 10+' || linux_distro === 'Ubuntu 18' || linux_distro === 'Ubuntu 20') {
packages += ' libc++abi-dev';
}
} else {
Expand Down Expand Up @@ -410,9 +407,9 @@
commands.push('cd vcpkg');
commands.push(local + 'bootstrap-vcpkg.bat');
if (build_64bit) {
commands.push(local + 'vcpkg.exe install openssl:x64-windows zlib:x64-windows');
commands.push(local + 'vcpkg.exe install gperf:x64-windows openssl:x64-windows zlib:x64-windows');
} else {
commands.push(local + 'vcpkg.exe install openssl:x86-windows zlib:x86-windows');
commands.push(local + 'vcpkg.exe install gperf:x86-windows openssl:x86-windows zlib:x86-windows');
}
commands.push('cd ..');
}
Expand Down
2 changes: 1 addition & 1 deletion td
Submodule td updated 298 files
Loading

0 comments on commit 97872f5

Please sign in to comment.