Skip to content

Commit 3385660

Browse files
authored
Update minimum CMake version (#793)
The use of CACHE in the SNMALLOC_STATIC_LIBRARY_PREFIX was not correctly handled by cmake before 3.21. > The “set(CACHE)” command no longer removes a normal variable of the same name, if any. See policy “CMP0126”. Changing the minimum version means that containing projects can do: ```CMake set(SNMALLOC_STATIC_LIBRARY_PREFIX "my_prefix") ``` Without this, there were weird behaviours that the first compile used "sn_" and then subsequent compiles used "my_prefix". Thanks to @achamayou for debugging this in CCF. microsoft/CCF#7161
1 parent 452fcc4 commit 3385660

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14)
1+
cmake_minimum_required(VERSION 3.21)
22
project(snmalloc CXX)
33

44
if (NOT CMAKE_BUILD_TYPE)

0 commit comments

Comments
 (0)