
Introduces `BUILD_JOB_SERVER_AWARE` option to `ExternalProject_Add` and `JOB_SERVER_AWARE` to `ExternalProject_Add_Step`. When using an explicit `BUILD_COMMAND` or `COMMAND`, the generated commands won't use `$(MAKE)` thus failing to connect to the outer make's job server. These new options enable explicit job server integration. Co-authored-by: Brad King <brad.king@kitware.com> Fixes: #16273
17 lines
381 B
CMake
17 lines
381 B
CMake
include(ExternalProject)
|
|
ExternalProject_Add(Foo
|
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Foo
|
|
BUILD_COMMAND ${DETECT_JOBSERVER} "ep.txt"
|
|
BUILD_JOB_SERVER_AWARE 1
|
|
INSTALL_COMMAND ""
|
|
)
|
|
|
|
# Add a second step to test JOB_SERVER_AWARE
|
|
ExternalProject_Add_Step(Foo
|
|
second_step
|
|
COMMAND ${DETECT_JOBSERVER} "ep_second_step.txt"
|
|
DEPENDEES build
|
|
ALWAYS 1
|
|
JOB_SERVER_AWARE 1
|
|
)
|