summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-15 19:16:43 +0800
committerGitHub <noreply@github.com>2024-10-15 19:16:43 +0800
commitbe42eeed7d9e510fea93922c615f1801bc54f336 (patch)
tree029aaa2fdfcbe628f0985a42edf2a7f47c6fc54d /CMakeLists.txt
parent456df23cff531566dfe3a6ca7be998f1251b1774 (diff)
Lower minimum CMake version to 3.22 (#5295)
* Lower minimum CMake version to 3.22 Reverts https://github.com/shader-slang/slang/pull/4193 * Update build instructions to mention older CMake versions
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c5003401..6a87a61ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.25)
+cmake_minimum_required(VERSION 3.22)
# Our module dir, include that now so that we can get the version automatically
# from git describe
@@ -15,7 +15,9 @@ set(PROJECT_VERSION "${SLANG_VERSION_FULL}")
#
# Global CMake options
#
-cmake_policy(SET CMP0135 OLD)
+if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24")
+ cmake_policy(SET CMP0135 OLD)
+endif()
cmake_policy(SET CMP0077 NEW)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.25")