Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

cmake policy CMP0042 doesn't exist in cmake version 2.8.1 #10

Closed
sfod opened this issue Sep 1, 2016 · 1 comment
Closed

cmake policy CMP0042 doesn't exist in cmake version 2.8.1 #10

sfod opened this issue Sep 1, 2016 · 1 comment

Comments

@sfod
Copy link

sfod commented Sep 1, 2016

There is a little inconsistency in CMakeLists.txt in these lines:

cmake_minimum_required(VERSION 2.8.1)
cmake_policy(SET CMP0042 NEW)

Problem is CMP0042 was introduced in CMake version 3.0 (https://cmake.org/cmake/help/v3.0/policy/CMP0042.html)

Probably the easiest solution is to set minimum required version of CMake to 3.0.

But I've encountered this problem on Ubuntu 14.04, where default CMake verison is 2.8.12.
To fix CMake errors I've replace the first two commands with following:

cmake_minimum_required(VERSION 2.8.12)
set(CMAKE_MACOSX_RPATH 1)
@Cylix
Copy link
Owner

Cylix commented Sep 1, 2016

Hi,

Thank you for noticing me about that, you are absolutely right.
I made the modification using your suggestion.

Thanks again!

@Cylix Cylix closed this as completed Sep 1, 2016
cmorse pushed a commit to cmorse/cpp_redis that referenced this issue Oct 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants