[Bug]: cmake-4 compatibility warnings
Author: ajakkCreated Aug 16, 2026Updated Aug 16, 2026
Labelsbugneeds confirmation
Checklist
- I have read the appropriate section in the contributing guidelines
- I believe this issue is a problem with polybar itself and not a misconfiguration on my part
- I have searched for other open and closed issues that may have already reported this problem
- I have checked the known issues page for this problem.
- I have followed the debugging guide to narrow down the problem to a minimal config.
Steps to reproduce
~/git/polybar $ git log -1
commit f99e0b1c7a5b094f5a04b14101899d0cb4ece69d (HEAD -> master, origin/master, origin/HEAD)
Author: p_q <[email protected]>
Date: Wed Sep 10 10:24:55 2025 +0200
Fix missing cstdint header for compiling with gcc15.
See https://gcc.gnu.org/gcc-15/porting_to.html for the details.
~/git/polybar $ cd build
~/git/polybar/build $ cmake ..
[...]
CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
-- No build type specified; using Release
CMake Warning (dev) at cmake/04-targets.cmake:40 (add_custom_command):
Exactly one of PRE_BUILD, PRE_LINK, or POST_BUILD must be given. Assuming
POST_BUILD to preserve backward compatibility.
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):
CMakeLists.txt:63 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at cmake/04-targets.cmake:48 (add_custom_command):
Exactly one of PRE_BUILD, PRE_LINK, or POST_BUILD must be given. Assuming
POST_BUILD to preserve backward compatibility.
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):
CMakeLists.txt:63 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at cmake/04-targets.cmake:57 (add_custom_command):
Exactly one of PRE_BUILD, PRE_LINK, or POST_BUILD must be given. Assuming
POST_BUILD to preserve backward compatibility.
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):
CMakeLists.txt:63 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at cmake/04-targets.cmake:65 (add_custom_command):
Exactly one of PRE_BUILD, PRE_LINK, or POST_BUILD must be given. Assuming
POST_BUILD to preserve backward compatibility.
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):
CMakeLists.txt:63 (include)
This warning is for project developers. Use -Wno-dev to suppress it.Minimal config
N/APolybar log
Expected behavior
N/A
Actual behavior
N/A
Window Manager and Version
N/A
Linux Distribution
Gentoo
Polybar version
polybar @ f99e0b1c7a5b094f5a04b14101899d0cb4ece69dAdditional Context / Screenshots
No response
Source: polybar/polybar