Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMakeLists backwards compatibility #2607

Merged
merged 1 commit into from
Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
cmake_minimum_required (VERSION 3.4)

if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12")
if (CMAKE_VERSION VERSION_GREATER 3.12 OR CMAKE_VERSION VERSION_EQUAL 3.12)
#find_package uses <PACKAGENAME>_ROOT variables
cmake_policy(SET CMP0074 NEW)
endif()
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13")
if (CMAKE_VERSION VERSION_GREATER 3.13 OR CMAKE_VERSION VERSION_EQUAL 3.13)
#option honors normal variables
cmake_policy(SET CMP0077 NEW)
endif()

if (CMAKE_VERSION VERSION_LESS 3.11)
# compatibility for boost import targets use bundled 3.11 FindBoost.cmake
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/legacyModules")
endif ()

# compatibility for osx sierra and on
# needs to be set before project
set (CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "")
Expand Down
Loading