[all-commits] [llvm/llvm-project] 582fe3: [mlir][python][cmake] Remove unsupported argument ...
Scott Todd via All-commits
all-commits at lists.llvm.org
Tue Jan 21 20:28:56 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 582fe3e0cac57cc47473f80dd96a2bd06ecd6290
https://github.com/llvm/llvm-project/commit/582fe3e0cac57cc47473f80dd96a2bd06ecd6290
Author: Scott Todd <scott.todd0 at gmail.com>
Date: 2025-01-21 (Tue, 21 Jan 2025)
Changed paths:
M mlir/cmake/modules/AddMLIRPython.cmake
Log Message:
-----------
[mlir][python][cmake] Remove unsupported argument from AddMLIRPython. (#123858)
See https://cmake.org/cmake/help/latest/policy/CMP0175.html
> The `OUTPUT` form does not accept `PRE_BUILD`, `PRE_LINK`, or
`POST_BUILD` keywords.
When using CMake version 3.31+, this results in ~2000 lines of warning
spam in my downstream project:
```
CMake Warning (dev) at build-gcc/lib/cmake/mlir/AddMLIRPython.cmake:606 (add_custom_command):
The following keywords are not supported when using
add_custom_command(OUTPUT): PRE_BUILD.
Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
Run "cmake --help-policy CMP0175" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
build-gcc/lib/cmake/mlir/AddMLIRPython.cmake:222 (add_mlir_python_sources_target)
build-gcc/lib/cmake/mlir/AddMLIRPython.cmake:256 (_process_target)
compiler/bindings/python/CMakeLists.txt:239 (add_mlir_python_modules)
This warning is for project developers. Use -Wno-dev to suppress it.
```
General docs:
https://cmake.org/cmake/help/latest/command/add_custom_command.html.
Note that `PRE_BUILD` only appears in the _second_ signature for the
function (which takes `TARGET`) not the first (which takes `OUTPUT`).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list