Commit daeedd94 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

fix building with CMake 3.9+

Summary:
D6806326 reduced the minimum version of CMake required to 3.2.0.  This had the
unintended effect of also disabling some newer CMake policies by default, which
caused builds to fail in newer CMake versions.

In particular, we make use of the GoogleTest module when it is available (CMake
3.9+).  However it requires policy `CMP0057` to be enabled.

This explicitly enables `CMP0057` when it is available.

Reviewed By: yfeldblum

Differential Revision: D6816891

fbshipit-source-id: 60ca46654d46207a96f0fad9c3467426a25b4afd
parent 317a3e0d
cmake_minimum_required(VERSION 3.2.0 FATAL_ERROR)
# We use the GoogleTest module if it is available (only in CMake 3.9+)
# It requires CMP0057 to be enabled.
if (POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()
# includes
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
......
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