* Update CMakeLists.txt
* Update CMakeLists.txt
endif()
endif()
- set(GIT_INDEX "${GIT_DIR}/index")
+ if(EXISTS "${GIT_DIR}/index")
+ set(GIT_INDEX "${GIT_DIR}/index")
+ else()
+ message(WARNING "Git index not found in git repository.")
+ set(GIT_INDEX "")
+ endif()
else()
message(WARNING "Git repository not found; to enable automatic generation of build info, make sure Git is installed and the project is a Git repository.")
set(GIT_INDEX "")