Skip to content

Commit

Permalink
#968 Swap PROJECT_IS_TOP_LEVEL called before project()
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelFeistETC committed Jan 15, 2025
1 parent 99d7537 commit a4cf9af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function(determine_version_with_git)
git_describe(VERSION ${ARGN})
string(FIND ${VERSION} "." VALID_VERSION)
if(VALID_VERSION EQUAL -1)
if(PROJECT_IS_TOP_LEVEL)
if(CMAKE_CURRENT_LIST_DIR STREQUAL PROJECT_SOURCE_DIR)
# only warn if this is the top-level project, since we may be
# building from a tarball as a subproject
message(WARNING "Version string ${VERSION} retrieved with git describe is invalid")
Expand Down

0 comments on commit a4cf9af

Please sign in to comment.