From 50fb897dd01a0fecac82a8c8751c542ef5f86e07 Mon Sep 17 00:00:00 2001 From: Brian Moore Date: Sat, 30 Mar 2024 14:13:46 -0700 Subject: [PATCH] CMake: Fix for older versions of cmake --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f699a04..7490399d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,9 @@ set(clblast_VERSION "${clblast_VERSION_MAJOR}.${clblast_VERSION_MINOR}.${clblast set(clblast_SOVERSION ${clblast_VERSION_MAJOR}) # Policies -cmake_policy(SET CMP0074 NEW) # to make -DCBLAS_ROOT= work with newer CMake versions as well +IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0") + cmake_policy(SET CMP0074 NEW) # to make -DCBLAS_ROOT= work with newer CMake versions as well +ENDIF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0") # Options and their default values option(BUILD_SHARED_LIBS "Build a shared (ON) or static library (OFF)" ON)