From f86d97c3fee0127d83c009e448f419ac857c72c7 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Mon, 18 May 2020 13:00:03 +0000 Subject: [PATCH] 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. --- sql/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 48985ced09f..0dc3caab507 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -76,6 +76,8 @@ IF(SSL_DEFINES) ENDIF() SET (SQL_SOURCE + ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc + ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.cc ../sql-common/client.c compat56.cc derror.cc des_key_file.cc discover.cc ../sql-common/errmsg.c field.cc field_conv.cc field_comp.cc @@ -156,8 +158,6 @@ SET (SQL_SOURCE opt_trace.cc table_cache.cc encryption.cc temporary_tables.cc proxy_protocol.cc backup.cc xa.cc - ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc - ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.cc ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h ${GEN_SOURCES}