Skip to content

Commit 28f541c

Browse files
committed
[feature] add CMP0091
1 parent 981c48d commit 28f541c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cmake_generator.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,11 @@ void generate_cmake(const char *path, const parser::Project *parent_project) {
523523

524524
if (root_project) {
525525
cmd("cmake_minimum_required")("VERSION", project.cmake_version).endl();
526-
526+
// clang-format off
527+
cmd("if")("POLICY", "CMP0091");
528+
cmd("cmake_policy")("SET", "CMP0091", "NEW");
529+
cmd("endif")().endl();
530+
// clang-format on
527531
if (!project.allow_in_tree) {
528532
// clang-format off
529533
cmd("if")("CMAKE_SOURCE_DIR", "STREQUAL", "CMAKE_BINARY_DIR");

0 commit comments

Comments
 (0)