cmake: add ZIG_EXTRA_BUILD_ARGS option

This commit is contained in:
Kyle Schwarz 2024-08-03 11:28:09 -04:00 committed by Andrew Kelley
parent e9b5377b8e
commit a60810b5a3

View File

@ -945,6 +945,11 @@ set(ZIG_BUILD_ARGS
-Dno-langref -Dno-langref
) )
option(ZIG_EXTRA_BUILD_ARGS "Extra zig build args")
if(ZIG_EXTRA_BUILD_ARGS)
list(APPEND ZIG_BUILD_ARGS ${ZIG_EXTRA_BUILD_ARGS})
endif()
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
list(APPEND ZIG_BUILD_ARGS -Doptimize=Debug) list(APPEND ZIG_BUILD_ARGS -Doptimize=Debug)
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo") elseif("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")