Skip to content

Commit

Permalink
Check that the current version of CMake supports policy 141 before se… (
Browse files Browse the repository at this point in the history
NVIDIA#1924)

* Check that the current version of CMake supports policy 141 before setting it.

Fixes NVIDIA#1919

* Use if(POLICY ...) to test if the CMake policy is known.
  • Loading branch information
alliepiper committed Jul 4, 2024
1 parent e2984ac commit 166b97f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# 3.21 is the minimum for the developer build.
cmake_minimum_required(VERSION 3.15)

# sccache cannot handle the -Fd option generationg pdb files
if ("MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
# sccache cannot handle the -Fd option generating pdb files:
if (POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
endif()

Expand Down

0 comments on commit 166b97f

Please sign in to comment.