Skip to content

Commit f86d97c

Browse files
committed
Compiling - improve multithreaded build
In multithreaded build (at least confirmed with Windows ninja and msbuild), at the end of "sql" target compilation, only 2 processors are used, compiling either sql_yacc.cc or sql_yacc_ora.cc. Thus, link of dependent executables or libraries is delayed while build is underusing the CPU. Rearrange the source list to improve parallelism.
1 parent 8eed9a4 commit f86d97c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ IF(SSL_DEFINES)
7676
ENDIF()
7777

7878
SET (SQL_SOURCE
79+
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
80+
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.cc
7981
../sql-common/client.c compat56.cc derror.cc des_key_file.cc
8082
discover.cc ../sql-common/errmsg.c
8183
field.cc field_conv.cc field_comp.cc
@@ -156,8 +158,6 @@ SET (SQL_SOURCE
156158
opt_trace.cc
157159
table_cache.cc encryption.cc temporary_tables.cc
158160
proxy_protocol.cc backup.cc xa.cc
159-
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
160-
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.cc
161161
${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
162162
${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
163163
${GEN_SOURCES}

0 commit comments

Comments
 (0)