Commit 8f2735ff authored by wez@fb.com's avatar wez@fb.com Committed by Facebook Github Bot

getdeps: export a property that contains the path to the output executable

Summary:
Export a property that indicates the path to the test executable.  This is
useful for callers that want to install the binary or run it from other CMake
rules.

Reviewed By: simpkins

Differential Revision: D17647146

fbshipit-source-id: b32e2694e44a07d7c234e53a7a5c8443cb144487
parent c77641cc
......@@ -156,6 +156,12 @@ function(add_fb_python_executable EXE_NAME)
# Add an "ALL" target that depends on force ${EXE_NAME},
# so that ${EXE_NAME} will be included in the default list of build targets.
add_custom_target("${EXE_NAME}.GEN_PY_EXE" ALL DEPENDS "${output_file}")
# Allow resolving the executable path for the target that we generate
# via a generator expression like:
# "WATCHMAN_WAIT_PATH=$<TARGET_PROPERTY:watchman-wait.GEN_PY_EXE,EXECUTABLE>"
set_property(TARGET "${EXE_NAME}.GEN_PY_EXE"
PROPERTY EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/${output_file}")
endfunction()
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment