authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-16 20:46:41+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-16 20:46:41+02:00
logf2363623e1eb4c0b12b9a8f795e5ce02053ec1f1
tree45ddcdbc82bc4b64ab5468e6fcf0335b608eb740
parent19888f759fc8612f3627a1b9c898d0b7aa513119
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

cmake: Map MinSizeRel to ReleaseSmall.


1 files changed, 11 insertions(+), 6 deletions(-)

CMakeLists.txt+11-6
...@@ -943,13 +943,18 @@ set(ZIG_RELEASE_SAFE OFF CACHE BOOL "Build Zig as ReleaseSafe (with debug assert...@@ -943,13 +943,18 @@ set(ZIG_RELEASE_SAFE OFF CACHE BOOL "Build Zig as ReleaseSafe (with debug assert
943if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")943if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
944 list(APPEND ZIG_BUILD_ARGS -Doptimize=Debug)944 list(APPEND ZIG_BUILD_ARGS -Doptimize=Debug)
945else()945else()
946 if(ZIG_RELEASE_SAFE)946 if("${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")
947 list(APPEND ZIG_BUILD_ARGS -Doptimize=ReleaseSafe)947 list(APPEND ZIG_BUILD_ARGS -Doptimize=ReleaseSmall)
948 else()948 else()
949 list(APPEND ZIG_BUILD_ARGS -Doptimize=ReleaseFast)949 # Release and RelWithDebInfo
950 endif()950 if(ZIG_RELEASE_SAFE)
951 if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")951 list(APPEND ZIG_BUILD_ARGS -Doptimize=ReleaseSafe)
952 list(APPEND ZIG_BUILD_ARGS -Dstrip)952 else()
953 list(APPEND ZIG_BUILD_ARGS -Doptimize=ReleaseFast)
954 endif()
955 if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
956 list(APPEND ZIG_BUILD_ARGS -Dstrip)
957 endif()
953 endif()958 endif()
954endif()959endif()
955960