Skip to content

Commit

Permalink
Fix CMake policy to work with older CMake Versions than 3.24
Browse files Browse the repository at this point in the history
  • Loading branch information
TimHeldmann committed Oct 23, 2024
1 parent 41ae626 commit f640947
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
cmake_minimum_required(VERSION 3.16)

# Choose modern CMake behavior when extracting archives
cmake_policy(SET CMP0135 NEW)
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()

# Require out-of-source builds (taken from
# https://hsf-training.github.io/hsf-training-cmake-webpage/07-commonproblems/index.html)
Expand Down

0 comments on commit f640947

Please sign in to comment.