Skip to content

Commit 45b8d29

Browse files
committed
Added CMAKE_VERSION checking.
cmake version less than 3.1 doesn't have the policy CMP0054.
1 parent 0bfe4c4 commit 45b8d29

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.6)
22

3-
CMAKE_POLICY(SET CMP0054 NEW)
3+
IF ((CMAKE_VERSION VERSION_GREATER 3.1) OR
4+
(CMAKE_VERSION VERSION_EQUAL 3.1))
5+
CMAKE_POLICY(SET CMP0054 NEW)
6+
ENDIF ()
47

58
PROJECT (msgpack)
69

0 commit comments

Comments
 (0)