Force CMake to recheck external project source

Reviewers: mferencevic, buda

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D867
This commit is contained in:
Teon Banek 2017-10-06 10:41:03 +02:00
parent 11b2b83c96
commit 69f178b347

View File

@ -56,6 +56,12 @@ function(add_external_project name)
-DCMAKE_INSTALL_PREFIX=${source_dir}
${KW_CMAKE_ARGS}
INSTALL_COMMAND ${KW_INSTALL_COMMAND})
# Force the build step (which will check if the source changed) by removing
# the stamped build file.
ExternalProject_Add_Step(
${name}-proj force-build
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/src/${name}-proj-stamp/${name}-proj-build
DEPENDERS build ALWAYS 1)
endfunction(add_external_project)
# Calls `add_external_project`, sets NAME_LIBRARY, NAME_INCLUDE_DIR variables