Skip to content

Commit cf9fc5e

Browse files
authored
[CMake] enable CMP0147 policy if available (llvm#109150)
Closes llvm#38383. This enables parallel custom build commands, which improve compilation time on Windows with Visual Studio.
1 parent 4911235 commit cf9fc5e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/Modules/CMakePolicy.cmake

+6
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,9 @@ endif()
2929
if(POLICY CMP0144)
3030
cmake_policy(SET CMP0144 NEW)
3131
endif()
32+
33+
# CMP0147: Visual Studio Generators build custom commands in parallel.
34+
# New in CMake 3.27: https://cmake.org/cmake/help/latest/policy/CMP0147.html
35+
if(POLICY CMP0147)
36+
cmake_policy(SET CMP0147 NEW)
37+
endif()

0 commit comments

Comments
 (0)