Skip to content
Snippets Groups Projects
Commit 9d1bf977 authored by dutor's avatar dutor Committed by GitHub
Browse files

Improved build concurrency (#948)

* Improved build concurrency

* Depend on parser

* Addressed @yixinglu's comment

* Fixed issue when ASAN enabled
parent 93b898f2
No related branches found
No related tags found
No related merge requests found
...@@ -380,13 +380,26 @@ macro(nebula_add_test) ...@@ -380,13 +380,26 @@ macro(nebula_add_test)
endif() endif()
endmacro() endmacro()
macro(nebula_build_after_base obj_name) # For simplicity, we make all ordinary libraries depend on the compile-time generated files,
add_dependencies(${obj_name} base_obj) # including the precompiled header, a.k.a Base.h.gch, and thrift headers.
endmacro()
macro(nebula_add_library name type) macro(nebula_add_library name type)
add_library(${name} ${type} ${ARGN}) add_library(${name} ${type} ${ARGN})
nebula_build_after_base(${name}) if (PCHSupport_FOUND)
add_dependencies(
${name}
base_obj_gch
)
endif()
add_dependencies(
${name}
common_thrift_headers
graph_thrift_headers
storage_thrift_headers
meta_thrift_headers
raftex_thrift_headers
hbase_thrift_headers
parser_target
)
endmacro() endmacro()
include_directories(SYSTEM ${NEBULA_THIRDPARTY_ROOT}/bzip2/include) include_directories(SYSTEM ${NEBULA_THIRDPARTY_ROOT}/bzip2/include)
......
add_library( nebula_add_library(
graph_obj OBJECT graph_obj OBJECT
GraphFlags.cpp GraphFlags.cpp
GraphService.cpp GraphService.cpp
...@@ -49,27 +49,11 @@ add_library( ...@@ -49,27 +49,11 @@ add_library(
MatchExecutor.cpp MatchExecutor.cpp
DeleteVertexExecutor.cpp DeleteVertexExecutor.cpp
) )
add_dependencies(
graph_obj
parser_obj
graph_thrift_obj
meta_thrift_obj
meta_client
gflags_man_obj
schema_obj
stats_obj
process_obj
base_obj
)
add_library( nebula_add_library(
graph_http_handler OBJECT graph_http_handler OBJECT
GraphHttpHandler.cpp GraphHttpHandler.cpp
) )
add_dependencies(
graph_http_handler
base_obj
)
nebula_add_subdirectory(test) nebula_add_subdirectory(test)
...@@ -4,6 +4,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) ...@@ -4,6 +4,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
bison_target(Parser parser.yy ${CMAKE_CURRENT_BINARY_DIR}/GraphParser.cpp COMPILE_FLAGS "-Werror") bison_target(Parser parser.yy ${CMAKE_CURRENT_BINARY_DIR}/GraphParser.cpp COMPILE_FLAGS "-Werror")
flex_target(Scanner scanner.lex ${CMAKE_CURRENT_BINARY_DIR}/GraphScanner.cpp) flex_target(Scanner scanner.lex ${CMAKE_CURRENT_BINARY_DIR}/GraphScanner.cpp)
add_custom_target(parser_target DEPENDS ${FLEX_Scanner_OUTPUTS} ${BISON_Parser_OUTPUTS})
add_flex_bison_dependency(Scanner Parser) add_flex_bison_dependency(Scanner Parser)
add_compile_options(-Wno-error=sign-compare) add_compile_options(-Wno-error=sign-compare)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment