diff --git a/CMakeLists.txt b/CMakeLists.txt index a5eb52bab7..a46bb885eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,7 @@ get_git_head_revision(GIT_REFSPEC GIT_SHA1) # if we cannot get it from git, directly try .tag (packages) # this will work if the tar balls have been properly created # via git-archive. -if (${GIT_SHA1} STREQUAL "GITDIR-NOTFOUND") +if ("${GIT_SHA1}" STREQUAL "GITDIR-NOTFOUND") file(READ ${CMAKE_SOURCE_DIR}/.tag sha1_candidate) string(REPLACE "\n" "" sha1_candidate ${sha1_candidate}) if (NOT ${sha1_candidate} STREQUAL "$Format:%H$")