CMake: Use output file diffing from config_gen.py

Take advantage of the new --skip-unchanged option added to the
config_gen.py header generator to skip regenerating unchanged header
files which forced a rebuild of the entire project whenever CMake was
reconfigured.

Signed-off-by: James Martin <fennelfoxxo@gmail.com>
This commit is contained in:
Fennelfoxxo
2025-04-08 05:21:56 -07:00
committed by Gerwin Klein
parent e8094340a3
commit 6a74aba245

View File

@@ -552,7 +552,7 @@ function(add_config_library prefix configure_template)
execute_process(
COMMAND
"${PYTHON3}" "${CONFIG_GEN_PATH}" "${config_yaml_file}" --write-c
"${PYTHON3}" "${CONFIG_GEN_PATH}" "${config_yaml_file}" --skip-unchanged --write-c
"${config_header_file}" --write-json "${config_json_file}"
RESULT_VARIABLE error
)