Skip to content

Commit d4cad85

Browse files
committed
Improve CMakeLists comments.
1 parent 81dc2e2 commit d4cad85

9 files changed

Lines changed: 9 additions & 26 deletions

File tree

‎CMake/TdSetUpCompiler.cmake‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# - Configures C++14 compiler, setting TDLib-specific compilation options.
1+
# Configures C++14 compiler, setting TDLib-specific compilation options.
22

33
function(td_set_up_compiler)
44
set(CMAKE_EXPORT_COMPILE_COMMANDS 1 PARENT_SCOPE)

‎CMakeLists.txt‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if (POLICY CMP0069)
7272
endif()
7373
endif()
7474

75-
# Configure CCache if available
75+
# Configure Ccache if available
7676
find_program(CCACHE_FOUND ccache)
7777
#set(CCACHE_FOUND 0)
7878
if (CCACHE_FOUND)
@@ -221,7 +221,7 @@ if (HAS_PARENT)
221221
endif()
222222

223223

224-
#SOURCE SETS
224+
# SOURCE SETS
225225

226226
set_source_files_properties(${TL_TD_API_AUTO_SOURCE} PROPERTIES GENERATED TRUE)
227227
if (TD_ENABLE_JNI OR ANDROID)
@@ -1057,7 +1057,7 @@ set(MEMPROF_STAT_SOURCE
10571057
memprof/memprof_stat.h
10581058
)
10591059

1060-
#LIBRARIES
1060+
# LIBRARIES
10611061

10621062
# memprof - simple library for memory usage profiling
10631063
add_library(memprof STATIC ${MEMPROF_SOURCE})
@@ -1111,7 +1111,7 @@ if (NOT CMAKE_CROSSCOMPILING)
11111111
add_dependencies(tdmtproto tl_generate_mtproto)
11121112
endif()
11131113

1114-
# tdcore - mostly internal TDLib interface. One should use tdactor for interactions with it.
1114+
# tdcore - internal TDLib interface
11151115
if (MSVC AND TD_ENABLE_LTO)
11161116
add_library(tdcore_part1 STATIC ${TDLIB_SOURCE_PART1})
11171117
target_include_directories(tdcore_part1 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${TL_TD_AUTO_INCLUDE_DIR}>)
@@ -1174,7 +1174,7 @@ if (TD_ENABLE_DOTNET)
11741174
endif()
11751175
endif()
11761176

1177-
# tdc - TDLib interface in pure c.
1177+
# tdc - TDLib interface in pure C
11781178
add_library(tdc STATIC EXCLUDE_FROM_ALL ${TL_C_SCHEME_SOURCE} td/telegram/td_c_client.cpp td/telegram/td_c_client.h)
11791179
target_include_directories(tdc PUBLIC
11801180
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
@@ -1218,14 +1218,14 @@ target_include_directories(tdjson_static PUBLIC
12181218
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
12191219
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
12201220

1221+
# EXECUTABLES
12211222
if (EMSCRIPTEN)
12221223
set(TD_EMSCRIPTEN_SRC td/telegram/td_emscripten.cpp)
12231224
add_executable(${TD_EMSCRIPTEN} ${TD_EMSCRIPTEN_SRC})
12241225
target_include_directories(${TD_EMSCRIPTEN} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
12251226
target_link_libraries(${TD_EMSCRIPTEN} PRIVATE tdjson_static tdactor)
12261227
endif()
12271228

1228-
#EXECUTABLES
12291229
if (NOT CMAKE_CROSSCOMPILING)
12301230
add_executable(tg_cli td/telegram/cli.cpp ${TL_TD_JSON_SOURCE})
12311231

@@ -1256,7 +1256,7 @@ if (NOT CMAKE_CROSSCOMPILING)
12561256
add_dependencies(tg_cli tl_generate_json)
12571257
endif()
12581258

1259-
#Exported libraries
1259+
# Exported libraries
12601260
add_library(TdStatic INTERFACE)
12611261
target_link_libraries(TdStatic INTERFACE tdclient)
12621262

‎benchmark/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (NOT OPENSSL_FOUND)
77
find_package(ZLIB REQUIRED)
88
endif()
99

10-
#TODO: all benchmarks in one file
10+
# TODO: all benchmarks in one file
1111
add_executable(bench_crypto bench_crypto.cpp)
1212
target_link_libraries(bench_crypto PRIVATE tdutils ${OPENSSL_CRYPTO_LIBRARY} ${CMAKE_DL_LIBS} ${ZLIB_LIBRARIES})
1313
if (WIN32)

‎tdactor/CMakeLists.txt‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
66
set(CMAKE_INSTALL_LIBDIR "lib")
77
endif()
88

9-
#SOURCE SETS
109
set(TDACTOR_SOURCE
1110
td/actor/ConcurrentScheduler.cpp
1211
td/actor/impl/Scheduler.cpp
@@ -43,10 +42,6 @@ set(TDACTOR_TEST_SOURCE
4342
PARENT_SCOPE
4443
)
4544

46-
#RULES
47-
48-
#LIBRARIES
49-
5045
add_library(tdactor STATIC ${TDACTOR_SOURCE})
5146
target_include_directories(tdactor PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
5247
target_link_libraries(tdactor PUBLIC tdutils)

‎tddb/CMakeLists.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
66
set(CMAKE_INSTALL_LIBDIR "lib")
77
endif()
88

9-
#SOURCE SETS
109
set(TDDB_SOURCE
1110
td/db/binlog/Binlog.cpp
1211
td/db/binlog/BinlogEvent.cpp

‎tdnet/CMakeLists.txt‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ if (NOT OPENSSL_FOUND)
1111
find_package(ZLIB REQUIRED)
1212
endif()
1313

14-
#SOURCE SETS
1514
set(TDNET_SOURCE
1615
td/net/GetHostByNameActor.cpp
1716
td/net/HttpChunkedByteFlow.cpp
@@ -59,9 +58,6 @@ if (APPLE_WATCH)
5958
set_source_files_properties(td/net/DarwinHttp.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
6059
endif()
6160

62-
#RULES
63-
#LIBRARIES
64-
6561
add_library(tdnet STATIC ${TDNET_SOURCE})
6662
target_include_directories(tdnet PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
6763
target_include_directories(tdnet SYSTEM PRIVATE $<BUILD_INTERFACE:${OPENSSL_INCLUDE_DIR}>)

‎tdtl/CMakeLists.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
22
message(FATAL_ERROR "CMake >= 3.0.2 is required")
33
endif()
44

5-
#SOURCE SETS
65
set(TDTL_SOURCE
76
td/tl/tl_config.cpp
87
td/tl/tl_core.cpp
@@ -27,5 +26,3 @@ set(TDTL_SOURCE
2726

2827
add_library(tdtl STATIC ${TDTL_SOURCE})
2928
target_include_directories(tdtl PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
30-
#TODO
31-
#target_compile_options(tdtl PRIVATE "-std=c++03")

‎tdutils/CMakeLists.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ configure_file(td/utils/config.h.in td/utils/config.h @ONLY)
4242

4343
add_subdirectory(generate)
4444

45-
# TDUTILS
4645
set_source_files_properties(${TDMIME_AUTO} PROPERTIES GENERATED TRUE)
4746
if (CLANG OR GCC)
4847
set_property(SOURCE ${TDMIME_AUTO} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-conversion")
@@ -349,7 +348,6 @@ set(TDUTILS_TEST_SOURCE
349348
PARENT_SCOPE
350349
)
351350

352-
#LIBRARIES
353351
add_library(tdutils STATIC ${TDUTILS_SOURCE})
354352

355353
if (NOT CMAKE_CROSSCOMPILING AND TDUTILS_MIME_TYPE)

‎test/CMakeLists.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
22
message(FATAL_ERROR "CMake >= 3.0.2 is required")
33
endif()
44

5-
#SOURCE SETS
65
set(TD_TEST_SOURCE
76
${CMAKE_CURRENT_SOURCE_DIR}/country_info.cpp
87
${CMAKE_CURRENT_SOURCE_DIR}/db.cpp
@@ -36,7 +35,6 @@ set(TESTS_MAIN
3635
#target_link_libraries(all_tests PRIVATE tdcore tdclient)
3736

3837
if (NOT CMAKE_CROSSCOMPILING OR EMSCRIPTEN)
39-
#Tests
4038
if (OPENSSL_FOUND)
4139
add_executable(test-crypto EXCLUDE_FROM_ALL crypto.cpp)
4240
target_include_directories(test-crypto SYSTEM PRIVATE ${OPENSSL_INCLUDE_DIR})

0 commit comments

Comments
 (0)