mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
Avoid CMP0048 warning (#570)
Fixes #567. If pybind's CMakeLists gets loaded via an include_directory from another CMakeLists with a higher minimum version (e.g. 3.0), the project() command without a version produces a CMP0048 warning. This commit explicitly requests the new behaviour if the policy exists, as it won't cause problems (we set VERSION later).
This commit is contained in:
parent
c40d8c617f
commit
a3fec901b8
@ -7,6 +7,11 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
if (POLICY CMP0048)
|
||||
# cmake warns if loaded from a min-3.0-required parent dir, so silence the warning:
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
endif()
|
||||
|
||||
project(pybind11)
|
||||
|
||||
# Check if pybind11 is being used directly or via add_subdirectory
|
||||
|
Loading…
Reference in New Issue
Block a user