| ... | @@ -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 |
| 943 | if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") | 943 | if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") |
| 944 | list(APPEND ZIG_BUILD_ARGS -Doptimize=Debug) | 944 | list(APPEND ZIG_BUILD_ARGS -Doptimize=Debug) |
| 945 | else() | 945 | else() |
| 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() |
| 954 | endif() | 959 | endif() |
| 955 | | 960 | |