this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix/update debug-windows.ps1

alice 823e3273 30311341

+43 -10
+43 -10
debug-windows.ps1
··· 4 4 [Alias("f")] 5 5 [switch]$Fresh, 6 6 7 + 7 8 [Parameter()] 8 9 [Alias("p")] 9 10 [switch]$Pro, ··· 18 19 19 20 [Parameter()] 20 21 [Alias("m")] 21 - [switch]$Msys2 22 + [switch]$Msys2, 23 + 24 + [Parameter()] 25 + [Alias("s")] 26 + [switch]$Static, 27 + 28 + [Parameter()] 29 + [Alias("w")] 30 + [switch]$Warnings 22 31 ) 23 32 24 33 $BUILD_TYPE = "MinSizeRel" ··· 26 35 $PRO_VERSION_FLAG = "" 27 36 $ARCH_FLAGS = "-A x64" 28 37 $CMAKE_GENERATOR = "" 38 + $DEBUG_FLAGS = "" 39 + $STATIC_FLAG = "" 40 + $COMPILER_FLAGS = "" 29 41 30 42 if ($Fresh) { 31 43 Remove-Item -Path .cache, CMakeCache.txt, CMakeFiles, cmake_install.cmake -Force -Recurse -ErrorAction SilentlyContinue ··· 44 56 $BUILD_TYPE = "Debug" 45 57 } 46 58 59 + if ($Static) { 60 + $STATIC_FLAG = "-DBUILD_STATIC=On" 61 + } 62 + 63 + if ($Warnings) { 64 + if ($Msys2) { 65 + # MinGW uses GCC-style flags 66 + $WARNING_FLAGS = "-Wall -Wextra" 67 + $COMPILER_FLAGS = "$COMPILER_FLAGS -DCMAKE_C_FLAGS=`"$WARNING_FLAGS`" -DCMAKE_CXX_FLAGS=`"$WARNING_FLAGS`"" 68 + } else { 69 + # Visual Studio uses different flags 70 + $COMPILER_FLAGS = "$COMPILER_FLAGS -DCMAKE_C_FLAGS=`"/W4`" -DCMAKE_CXX_FLAGS=`"/W4`"" 71 + } 72 + } 73 + 47 74 if ($Win32) { 48 75 $ARCH_FLAGS = "-A Win32 -T v141_xp" 49 76 Copy-Item -Path "build\janet\janetconf.h" -Destination "vendor\janet\src\conf\janetconf.h" -Force ··· 58 85 } 59 86 60 87 Write-Host 61 - Write-Host "+-------------------------------+-------+" 62 - Write-Host "| Build Options | Value |" 63 - Write-Host "+-------------------------------+-------+" 64 - Write-Host "| Fresh build (-f, -fresh) | $(if ($Fresh) { "Yes" } else { "No " }) |" 65 - Write-Host "| Pro version (-p, -pro) | $(if ($Pro) { "Yes" } else { "No " }) |" 66 - Write-Host "| Debug build (-d, -bdebug) | $(if ($bDebug) { "Yes" } else { "No " }) |" 67 - Write-Host "| Win32 (-x, -win32) | $(if ($Win32) { "Yes" } else { "No " }) |" 68 - Write-Host "| MSYS2 (-m, -msys2) | $(if ($Msys2) { "Yes" } else { "No " }) |" 69 - Write-Host "+-------------------------------+-------+" 88 + Write-Host "+--------------------------------+-------+" 89 + Write-Host "| Build Options | Value |" 90 + Write-Host "+--------------------------------+-------+" 91 + Write-Host "| Fresh build (-f, -fresh) | $(if ($Fresh) { "Yes" } else { "No " }) |" 92 + Write-Host "| Pro version (-p, -pro) | $(if ($Pro) { "Yes" } else { "No " }) |" 93 + Write-Host "| Debug build (-d, -bdebug) | $(if ($bDebug) { "Yes" } else { "No " }) |" 94 + Write-Host "| Win32 (-x, -win32) | $(if ($Win32) { "Yes" } else { "No " }) |" 95 + Write-Host "| MSYS2 (-m, -msys2) | $(if ($Msys2) { "Yes" } else { "No " }) |" 96 + Write-Host "| Static build (-s, -static) | $(if ($Static) { "Yes" } else { "No " }) |" 97 + Write-Host "| Warnings (-w, -warnings) | $(if ($Warnings) { "Yes" } else { "No " }) |" 98 + Write-Host "+--------------------------------+-------+" 70 99 Write-Host 71 100 72 101 Set-Location -Path ./build -ErrorAction Stop ··· 76 105 "-DCMAKE_BUILD_TYPE=$BUILD_TYPE " + 77 106 "$PRO_VERSION_FLAG " + 78 107 "$SDLGPU_FLAG " + 108 + "$DEBUG_FLAGS " + 109 + "$COMPILER_FLAGS " + 110 + "$STATIC_FLAG " + 79 111 "-DBUILD_WITH_ALL=On " + 80 112 "-DCMAKE_EXPORT_COMPILE_COMMANDS=On " + 113 + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5 " + 81 114 ".." 82 115 83 116 Write-Host "Executing CMake Command: $cmakeCommand"