Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: use ${CMAKE_BINARY_DIR} when running 'cmake --build ..'
this change is a follow-up of 338ba97. before this change, ${CMAKE_CURRENT_BINARY_DIR} is used for Seastar_BINARY_DIR. if Seastar is a top-level project, the values of ${CMAKE_CURRENT_BINARY_DIR} and ${CMAKE_BINARY_DIR} are identical. but if Seastar is embedded in a parent project, ${CMAKE_BINARY_DIR} would be somewhere like "bulid/seastar" where "build" is the build directory of the parent project. but we are still referencing the build directory with ${Seastar_BINARY_DIR} and issuing commands like cmake --build ${Seastar_BINARY_DIR} --target ${target} if this would fail as the build directory is not ${Seastar_BINARY_DIR} anymore. if the cmake generator is make, the failure would look like: > gmake: *** No rule to make target 'test_unit_abort_source_run'. Stop. if the cmake generator is ninja, the failure would look like: > 1/95 Test #1: Seastar.unit.abort_source .....................***Failed 0.02 sec > ninja: error: loading 'build.ninja': No such file or directory after this change, all occurrences of cmake --build ${Seastar_BINARY_DIR} are changed to cmake --build ${CMAKE_BINARY_DIR} this ensure that these commands can find the build directory at the top level of the build tree. Signed-off-by: Kefu Chai <[email protected]>
- Loading branch information