Hello everyone,
What would be a sane way to capture custom step output ExternalProject_Add in some cmake variable ?
For example:
...
ExternalProject_Add(some_autotools_dep
GIT_REPOSITORY some_dep_url
GIT_TAG some_tag
GIT_SHALLOW ON
GIT_PROGRESS ON
CONFIGURE_COMMAND ./configure ...
BUILD_COMMAND cd <SOURCE_DIR> && make
INSTALL_COMMAND cd <SOURCE_DIR> && make install
UPDATE_COMMAND ""
BUILD_ALWAYS OFF
)
ExternalProject_Add_Step(some_autotools_dep check_upstream_file_sha
COMMAND ${CMAKE_COMMAND} -E sha512sum some_upstream_file
DEPENDERS configure
WORKING_DIRECTORY <SOURCE_DIR>
COMMENT "Checking sha..."
ALWAYS TRUE
)
// At this point I can see my custom step being executed at build stage
// and there is an stdout output of type:
// <some_hash_string> <some_upstream_file>
...
So the idea is to capture <some_hash_string> to a variable or maybe have some other way to check hash against somehow predetermined value ?
Thanks.