From e0c06a9ac1da141c2cb684b4a10ce457b3328360 Mon Sep 17 00:00:00 2001 From: Brian Moore Date: Mon, 1 Apr 2024 23:24:30 -0700 Subject: [PATCH] CMake: Fix for older versions of cmake (#536) --- 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)