From bd825872f55f060073b25f53c589d22db70cf338 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Thu, 26 Sep 2019 14:57:25 -0400 Subject: [PATCH] Simplify CMake policy guard Signed-off-by: FeRD (Frank Dana) --- python/CMakeLists.txt | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 494f6ff..4f758d5 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,7 +1,7 @@ -# swig_add_library behavior changed in cmake 3.13 and SWIG_MODULE__REAL_NAME -# is no longer set by default so set policy to the old behavior. -if(NOT CMAKE_VERSION VERSION_LESS 3.13.0) - cmake_policy(SET CMP0078 OLD) +# swig_add_library behavior changed in cmake 3.13 to no longer set +# SWIG_MODULE__REAL_NAME, so restore the old behavior. +if ( POLICY CMP0078 ) + cmake_policy( SET CMP0078 OLD ) endif () # workaround for cmake bug #0013449 -- 1.7.1