Support multiple COMPILE_DEFINITIONS for a program

Despite the name, COMPILE_DEFINITIONS was only ever used to set a
single definition, and as far as I can tell that's all it could do
even when I tried to put them in a single word separated by
semicolons.  Turning COMPILE_DEFINITIONS into a multi-valued argument
seems to make it work much better.
This commit is contained in:
Ben Harris
2023-02-20 00:28:42 +00:00
parent 1470c9530b
commit 1880feb442

View File

@ -115,7 +115,7 @@ endfunction()
# a command-line helper tool.
function(cliprogram NAME)
cmake_parse_arguments(OPT
"" "COMPILE_DEFINITIONS" "" ${ARGN})
"" "" "COMPILE_DEFINITIONS" ${ARGN})
if(build_cli_programs)
add_executable(${NAME} ${CMAKE_SOURCE_DIR}/nullfe.c
@ -131,7 +131,7 @@ endfunction()
# the normal puzzle frontend.
function(guiprogram NAME)
cmake_parse_arguments(OPT
"" "COMPILE_DEFINITIONS" "" ${ARGN})
"" "" "COMPILE_DEFINITIONS" ${ARGN})
if(build_gui_programs)
get_platform_puzzle_extra_source_files(extra_files ${NAME})