Skip to content

Commit 8ead1c0

Browse files
committed
Only apply policy CMP0015 if it exists, to be compatible with older CMake
1 parent 8e4e800 commit 8ead1c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ELSE(WIN32)
3636
cmake_minimum_required(VERSION 2.6)
3737
ENDIF(WIN32)
3838

39-
if(COMMAND cmake_policy)
39+
if(COMMAND cmake_policy AND POLICY CMP0015)
4040
cmake_policy(SET CMP0015 NEW)
4141
endif(COMMAND cmake_policy)
4242

0 commit comments

Comments
 (0)