build: simplify dependency graph
Allow the objects of static libs to be built in parallel rather than serially based on their dependency ordering. For more detail, see: https://cmake.org/cmake/help/latest/prop_tgt/OPTIMIZE_DEPENDENCIES.html
This commit is contained in:
1 parent
c4e498300c
commit
12fa9511b5
3 files changed
+13
No files matched your search
@@ -71,6 +71,13 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/module)
|
||||
|
||||
# Flatten static lib dependencies.
|
||||
# Without this, if libfoo.a depends on libbar.a, libfoo's objects can't begin
|
||||
# to be compiled until libbar.a has been created.
|
||||
if (NOT DEFINED CMAKE_OPTIMIZE_DEPENDENCIES)
|
||||
set(CMAKE_OPTIMIZE_DEPENDENCIES TRUE)
|
||||
endif()
|
||||
|
||||
#=============================
|
||||
# Configurable options
|
||||
#=============================
|
||||
|
||||
Reference in new issue
Block a user