build: eliminate semicolons from --version string

Refactor the --version string to remove semicolons. Although semicolons are
present in LINK_OPTIONS, they are not actually included during compilation.
This commit is contained in:
Daiki Noda 2023-12-17 21:55:15 +09:00 committed by GitHub
parent 5a2536de0c
commit f0eb3ca916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,6 +173,7 @@ append_target_expression(PROPERTY COMPILE_OPTIONS)
append_target_expression(PROPERTY LINK_OPTIONS)
append_target_expression(PREFIX "-D" PROPERTY COMPILE_DEFINITIONS)
append_target_expression(PREFIX "-I" PROPERTY INCLUDE_DIRECTORIES)
string(REPLACE ";" " " VERSION_STRING "${VERSION_STRING}") # Remove ; from LINK_FLAGS/LINK_OPTIONS
string(REPLACE " " " " VERSION_STRING "${VERSION_STRING}") # Remove duplicate whitespace
configure_file(versiondef.h.in auto/versiondef.h.gen)