diff --git a/CMake/TdSetUpCompiler.cmake b/CMake/TdSetUpCompiler.cmake index e469aa6b5..5bf25775d 100644 --- a/CMake/TdSetUpCompiler.cmake +++ b/CMake/TdSetUpCompiler.cmake @@ -1,4 +1,4 @@ -# - Configures C++14 compiler, setting TDLib-specific compilation options. +# Configures C++14 compiler, setting TDLib-specific compilation options. function(td_set_up_compiler) set(CMAKE_EXPORT_COMPILE_COMMANDS 1 PARENT_SCOPE) diff --git a/CMakeLists.txt b/CMakeLists.txt index 862ae9407..d9a338876 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,7 @@ if (POLICY CMP0069) endif() endif() -# Configure CCache if available +# Configure Ccache if available find_program(CCACHE_FOUND ccache) #set(CCACHE_FOUND 0) if (CCACHE_FOUND) @@ -221,7 +221,7 @@ if (HAS_PARENT) endif() -#SOURCE SETS +# SOURCE SETS set_source_files_properties(${TL_TD_API_AUTO_SOURCE} PROPERTIES GENERATED TRUE) if (TD_ENABLE_JNI OR ANDROID) @@ -1057,7 +1057,7 @@ set(MEMPROF_STAT_SOURCE memprof/memprof_stat.h ) -#LIBRARIES +# LIBRARIES # memprof - simple library for memory usage profiling add_library(memprof STATIC ${MEMPROF_SOURCE}) @@ -1111,7 +1111,7 @@ if (NOT CMAKE_CROSSCOMPILING) add_dependencies(tdmtproto tl_generate_mtproto) endif() -# tdcore - mostly internal TDLib interface. One should use tdactor for interactions with it. +# tdcore - internal TDLib interface if (MSVC AND TD_ENABLE_LTO) add_library(tdcore_part1 STATIC ${TDLIB_SOURCE_PART1}) target_include_directories(tdcore_part1 PUBLIC $ $) @@ -1174,7 +1174,7 @@ if (TD_ENABLE_DOTNET) endif() endif() -# tdc - TDLib interface in pure c. +# tdc - TDLib interface in pure C add_library(tdc STATIC EXCLUDE_FROM_ALL ${TL_C_SCHEME_SOURCE} td/telegram/td_c_client.cpp td/telegram/td_c_client.h) target_include_directories(tdc PUBLIC $ @@ -1218,6 +1218,7 @@ target_include_directories(tdjson_static PUBLIC $ $) +# EXECUTABLES if (EMSCRIPTEN) set(TD_EMSCRIPTEN_SRC td/telegram/td_emscripten.cpp) add_executable(${TD_EMSCRIPTEN} ${TD_EMSCRIPTEN_SRC}) @@ -1225,7 +1226,6 @@ if (EMSCRIPTEN) target_link_libraries(${TD_EMSCRIPTEN} PRIVATE tdjson_static tdactor) endif() -#EXECUTABLES if (NOT CMAKE_CROSSCOMPILING) add_executable(tg_cli td/telegram/cli.cpp ${TL_TD_JSON_SOURCE}) @@ -1256,7 +1256,7 @@ if (NOT CMAKE_CROSSCOMPILING) add_dependencies(tg_cli tl_generate_json) endif() -#Exported libraries +# Exported libraries add_library(TdStatic INTERFACE) target_link_libraries(TdStatic INTERFACE tdclient) diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index 07654b974..cdf359e95 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -7,7 +7,7 @@ if (NOT OPENSSL_FOUND) find_package(ZLIB REQUIRED) endif() -#TODO: all benchmarks in one file +# TODO: all benchmarks in one file add_executable(bench_crypto bench_crypto.cpp) target_link_libraries(bench_crypto PRIVATE tdutils ${OPENSSL_CRYPTO_LIBRARY} ${CMAKE_DL_LIBS} ${ZLIB_LIBRARIES}) if (WIN32) diff --git a/tdactor/CMakeLists.txt b/tdactor/CMakeLists.txt index 664a08999..2a7c68f5d 100644 --- a/tdactor/CMakeLists.txt +++ b/tdactor/CMakeLists.txt @@ -6,7 +6,6 @@ if (NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR "lib") endif() -#SOURCE SETS set(TDACTOR_SOURCE td/actor/ConcurrentScheduler.cpp td/actor/impl/Scheduler.cpp @@ -43,10 +42,6 @@ set(TDACTOR_TEST_SOURCE PARENT_SCOPE ) -#RULES - -#LIBRARIES - add_library(tdactor STATIC ${TDACTOR_SOURCE}) target_include_directories(tdactor PUBLIC $) target_link_libraries(tdactor PUBLIC tdutils) diff --git a/tddb/CMakeLists.txt b/tddb/CMakeLists.txt index a76fc6e4b..85573170d 100644 --- a/tddb/CMakeLists.txt +++ b/tddb/CMakeLists.txt @@ -6,7 +6,6 @@ if (NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR "lib") endif() -#SOURCE SETS set(TDDB_SOURCE td/db/binlog/Binlog.cpp td/db/binlog/BinlogEvent.cpp diff --git a/tdnet/CMakeLists.txt b/tdnet/CMakeLists.txt index d490f87f6..0e35c9722 100644 --- a/tdnet/CMakeLists.txt +++ b/tdnet/CMakeLists.txt @@ -11,7 +11,6 @@ if (NOT OPENSSL_FOUND) find_package(ZLIB REQUIRED) endif() -#SOURCE SETS set(TDNET_SOURCE td/net/GetHostByNameActor.cpp td/net/HttpChunkedByteFlow.cpp @@ -59,9 +58,6 @@ if (APPLE_WATCH) set_source_files_properties(td/net/DarwinHttp.mm PROPERTIES COMPILE_FLAGS -fobjc-arc) endif() -#RULES -#LIBRARIES - add_library(tdnet STATIC ${TDNET_SOURCE}) target_include_directories(tdnet PUBLIC $) target_include_directories(tdnet SYSTEM PRIVATE $) diff --git a/tdtl/CMakeLists.txt b/tdtl/CMakeLists.txt index 8b139ddc6..5d3399d2a 100644 --- a/tdtl/CMakeLists.txt +++ b/tdtl/CMakeLists.txt @@ -2,7 +2,6 @@ if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2")) message(FATAL_ERROR "CMake >= 3.0.2 is required") endif() -#SOURCE SETS set(TDTL_SOURCE td/tl/tl_config.cpp td/tl/tl_core.cpp @@ -27,5 +26,3 @@ set(TDTL_SOURCE add_library(tdtl STATIC ${TDTL_SOURCE}) target_include_directories(tdtl PUBLIC $) -#TODO -#target_compile_options(tdtl PRIVATE "-std=c++03") diff --git a/tdutils/CMakeLists.txt b/tdutils/CMakeLists.txt index 00fb3c304..9783a5d96 100644 --- a/tdutils/CMakeLists.txt +++ b/tdutils/CMakeLists.txt @@ -42,7 +42,6 @@ configure_file(td/utils/config.h.in td/utils/config.h @ONLY) add_subdirectory(generate) -# TDUTILS set_source_files_properties(${TDMIME_AUTO} PROPERTIES GENERATED TRUE) if (CLANG OR GCC) set_property(SOURCE ${TDMIME_AUTO} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-conversion") @@ -349,7 +348,6 @@ set(TDUTILS_TEST_SOURCE PARENT_SCOPE ) -#LIBRARIES add_library(tdutils STATIC ${TDUTILS_SOURCE}) if (NOT CMAKE_CROSSCOMPILING AND TDUTILS_MIME_TYPE) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a45b04adb..da7d45c3f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,7 +2,6 @@ if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2")) message(FATAL_ERROR "CMake >= 3.0.2 is required") endif() -#SOURCE SETS set(TD_TEST_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/country_info.cpp ${CMAKE_CURRENT_SOURCE_DIR}/db.cpp @@ -36,7 +35,6 @@ set(TESTS_MAIN #target_link_libraries(all_tests PRIVATE tdcore tdclient) if (NOT CMAKE_CROSSCOMPILING OR EMSCRIPTEN) - #Tests if (OPENSSL_FOUND) add_executable(test-crypto EXCLUDE_FROM_ALL crypto.cpp) target_include_directories(test-crypto SYSTEM PRIVATE ${OPENSSL_INCLUDE_DIR})