Commit fdc44f51 authored by Raul Tambre's avatar Raul Tambre Committed by Facebook GitHub Bot

CMake: Fix version comparison for target argument (#1439)

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](https://github.com/facebook/folly/pull/1433#discussion_r484278801).

Pull Request resolved: https://github.com/facebook/folly/pull/1439

Reviewed By: yfeldblum

Differential Revision: D23564812

Pulled By: Orvid

fbshipit-source-id: 19881876147ec73ad70610cf97c408740f998340
parent 046adb70
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment