Skip to content

Do not generate rules for .def generation where not supported

Brad King requested to merge brad.king/cmake:def-generate-windows-only into master

Our cmake -E __create_def helper used for WINDOWS_EXPORT_ALL_SYMBOLS and merging of multiple .def files is available only with CMake hosted on Windows. However, we may generate use of it on other platforms since !581 (merged) when multiple .def files are listed. This results in a build error because the tool doesn't exist.

Fix our logic to avoid using the tool on non-Windows platforms. Instead silently ignore all but the first .def source as we did before.

Issue: #17773

Merge request reports