Skip to content

Commit d3aba60

Browse files
#968 Swap PROJECT_IS_TOP_LEVEL called before project() (#1015)
1 parent b34e3a6 commit d3aba60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/helpers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function(determine_version_with_git)
1313
git_describe(VERSION ${ARGN})
1414
string(FIND ${VERSION} "." VALID_VERSION)
1515
if(VALID_VERSION EQUAL -1)
16-
if(PROJECT_IS_TOP_LEVEL)
16+
if(CMAKE_CURRENT_LIST_DIR STREQUAL PROJECT_SOURCE_DIR)
1717
# only warn if this is the top-level project, since we may be
1818
# building from a tarball as a subproject
1919
message(WARNING "Version string ${VERSION} retrieved with git describe is invalid")

0 commit comments

Comments
 (0)