@@ -61,6 +61,12 @@ newoption {
6161 description = " use clang-cl.exe instead of cl.exe"
6262}
6363
64+ -- TODO: won't be needed with premake5 beta 8
65+ newoption {
66+ trigger = " with-2026" ,
67+ description = " use vs2026 directory"
68+ }
69+
6470-- TODO: test this option
6571-- usestandardpreprocessor 'On'
6672
@@ -139,6 +145,16 @@ function optimized_conf()
139145 filter {}
140146end
141147
148+ -- TODO: temporary, create 2022 project in 2026
149+ -- directory and then needs manual retarget in vs2026
150+ -- in premake5 beta 8 (not yet released) vs2026 action
151+ -- is supported and we'll be able to switch to that
152+ function conf_2026 ()
153+ filter { " options:with-2026" }
154+ location " vs2026"
155+ filter {}
156+ end
157+
142158-- per-workspace setting that differ in clang-cl.exe vs cl.exe builds
143159function clang_conf ()
144160 filter " options:with-clang"
@@ -214,7 +230,9 @@ workspace "SumatraPDF"
214230 location " vs2022"
215231 filter {}
216232
233+
217234 clang_conf ()
235+ conf_2026 ()
218236
219237 filter {" platforms:x32" , " configurations:Release" }
220238 targetdir " out/rel32"
@@ -287,7 +305,7 @@ workspace "SumatraPDF"
287305 optimized_conf ()
288306 defines { " UNRAR" , " RARDLL" , " SILENT" }
289307 -- os.hpp redefines WINVER, is there a better way?
290- disablewarnings { " 4005" , " 4100" , " 4201" , " 4211" , " 4244" , " 4310" , " 4389" , " 4456" , " 4459" , " 4505" , " 4701" , " 4702" , " 4706" , " 4709" , " 4731" , " 4996" }
308+ disablewarnings { " 4005" , " 4100" , " 4201" , " 4211" , " 4244" , " 4310" , " 4389" , " 4456" , " 4459" , " 4505" , " 4701" , " 4702" , " 4706" , " 4709" , " 4731" , " 4996" }
291309 -- unrar uses exception handling in savepos.hpp but I don't want to enable it
292310 -- as it seems to infect the Sumatra binary as well (i.e. I see bad alloc exception
293311 -- being thrown)
@@ -499,7 +517,7 @@ workspace "SumatraPDF"
499517 files { " ext/mujs/one.c" , " ext/mujs/mujs.h" }
500518
501519 -- gumbo
502- disablewarnings { " 4018" , " 4100" , " 4132" , " 4204" , " 4244" , " 4245" , " 4267" ,
520+ disablewarnings { " 4018" , " 4100" , " 4132" , " 4204" , " 4244" , " 4245" , " 4267" ,
503521 " 4305" , " 4306" , " 4389" , " 4456" , " 4701" }
504522 includedirs { " ext/gumbo-parser/include" , " ext/gumbo-parser/visualc/include" }
505523 gumbo_files ()
@@ -588,7 +606,7 @@ workspace "SumatraPDF"
588606 filter {}
589607
590608 disablewarnings {
591- " 4005" , " 4018" , " 4057" , " 4100" , " 4115" , " 4130" , " 4132" , " 4200" , " 4204" , " 4206" , " 4210" ,
609+ " 4005" , " 4018" , " 4057" , " 4100" , " 4115" , " 4130" , " 4132" , " 4200" , " 4204" , " 4206" , " 4210" ,
592610 " 4245" , " 4267" , " 4295" , " 4305" , " 4389" , " 4456" , " 4457" , " 4703" , " 4706" , " 4819" , " 5286"
593611 }
594612 -- force including mupdf/scripts/openjpeg/opj_config_private.h
@@ -918,8 +936,9 @@ workspace "MakeLZSA"
918936 filter " action:vs2022"
919937 location " vs2022"
920938 filter {}
921-
939+
922940 clang_conf ()
941+ conf_2026 ()
923942
924943 filter {" platforms:x32" , " configurations:Release" }
925944 targetdir " out/rel32"
0 commit comments