title: How to get git branch/tag names in CMake, from external project?
body: <p>Is it possible to list all git branches or tags in cmake configure step (in ccmake/cmake-gui)?</p>
  
  <p>I want to allow the user to select a specific branch/tag (available on current repository), which will be used in build (make) step for download external project.</p>
  
  <p>Inital CMakeLists.txt file:</p>
  
  <pre><code>cmake_minimum_required (VERSION 2.8)
  project (project_name)
  
  find_package (Git)
  if (GIT_FOUND)
        message("git found: ${GIT_EXECUTABLE} in version     ${GIT_VERSION_STRING}")
  endif (GIT_FOUND)
  
  set (DEFAULT_TAG "tag_default")
  # set (TAGS ...) getting the names of all tags from repository
  
  set (REPO_TAG ${DEFAULT_TAG} CACHE STRING "Select a repo tag")
  set_property (CACHE REPO_TAG PROPERTY STRINGS ${TAGS})
  
  include(ExternalProject)
  ExternalProject_Add (
      numpy
      GIT_REPOSITORY git@bitbucket.org:pypy/numpy.git
      GIT_TAG ${REPO_TAG}
  )
  </code></pre>