Skip to content

Commit

Permalink
CMake: Fix version comparison for target argument (facebook#1439)
Browse files Browse the repository at this point in the history
Summary:
VERSION_GREATER 3.18 also matches 3.18.2, which is wrong as the target argument was only added in 3.19.
After noticing that folly requires an ancient CMake version I converted over from VERSION_GREATER_EQUAL and introduced the comparison error.

Issue reported [here](facebook#1433 (comment)).

Pull Request resolved: facebook#1439

Reviewed By: yfeldblum

Differential Revision: D23564812

Pulled By: Orvid

fbshipit-source-id: 19881876147ec73ad70610cf97c408740f998340
  • Loading branch information
tambry authored and dotconnor committed Mar 18, 2021
1 parent e992368 commit e74c5b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ configure_file(

# Specify target to allow resolving generator expressions requiring
# a target for CMake >=3.19. See #1414.
if(CMAKE_VERSION VERSION_GREATER 3.18)
# VERSION_GREATER_EQUAL isn't available before CMake 3.7.
if(NOT CMAKE_VERSION VERSION_LESS 3.19)
set(target_arg TARGET folly_deps)
endif()

Expand Down

0 comments on commit e74c5b5

Please sign in to comment.