ExternalProject update and build steps always run even with GIT_REPOSITORY and GIT_TAG set
I see this only on "Unix Makefile" builds in cmake 3.6 and 3.7. I see the problem on cygwin64, Windows 10 WSL, and Ubuntu 16.04.1. The visual studio generators, however, work fine and don't run all of the ExternalProject steps on every incremental build. Also, cmake 3.3 "Unix Makefiles" work as expected and do not rerun ExternalProject steps on every cmake build.
I have a simple CMakeLists.txt which contains just one ExternalProject_Add using GIT_REPOSITORY with a GIT_TAG
cmake_minimum_required(VERSION 3.6)
include(ExternalProject)
project(test1)
ExternalProject_Add(hello
GIT_REPOSITORY "https://github.com/jameskbride/cmake-hello-world.git"
GIT_TAG ecc0aa9
CMAKE_ARGS
"-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/install"
)
I would expect subsequent incremental builds to see that the ExternalProject source has not changed and matches the GIT_TAG and then stop. But, actually I see all of the ExternalProject build steps get triggered on every incremental build. If I add UPDATE_COMMAND "" then I get the expected behavior and cmake does nothing on incremental builds. But, this is not really a solution since I would like to be able to just change the GIT_TAG in my CMakeLists.txt file and have that trigger a new ExternalProject build. But, if UPDATE_COMMAND "" is set then this wont happen.