From d5a37e5661d6dd466cd5dd914300f06406b48f3d Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 8 Apr 2014 09:34:11 +0200 Subject: cmake: Only set policy in cmake 3.0. Signed-off-by: Andreas Schneider Reviewed-by: Jakub Hrozek --- src/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 449ed54..50ac9ad 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,6 +23,8 @@ set_target_properties( ) # This needs to be at the end -cmake_policy(SET CMP0026 OLD) +if (CMAKE_VERSION VERSION_GREATER 2.8.13) + cmake_policy(SET CMP0026 OLD) +endif() get_target_property(SWRAP_LOCATION socket_wrapper LOCATION) set(SOCKET_WRAPPER_LOCATION ${SWRAP_LOCATION} PARENT_SCOPE) -- cgit