mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
The warning for policy CMP0174 can be triggered if a project mistakenly specifies CONFIGURE_COMMAND, BUILD_COMMAND, INSTALL_COMMAND, or TEST_COMMAND as keywords to FetchContent_Declare() and it passes an empty string after the keyword. It shouldn't be specifying any of those keywords, but doing so has always worked because FetchContent_Declare() explicitly discards them. However, when a project specifies them, they get used internally in contexts where the policy settings are those of the FetchContent module itself. Those settings haven't been updated past CMake 3.29, and CMP0174 came in with CMake 3.31. Update the policy settings for FetchContent to avoid triggering the CMP0174 warning when a project erroneously specifies the prohibited keywords. Fixes: #27157