File tree Expand file tree Collapse file tree 4 files changed +50
-1
lines changed Expand file tree Collapse file tree 4 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 5959RESCOMP = windres
6060 ]]
6161 end
62+
63+ function suite .usesCorrectTools_msc ()
64+ gmake .cpp .tools (cfg , p .tools .msc )
65+ test .capture [[
66+ ifeq ($(origin CC), default)
67+ CC = cl
68+ endif
69+ ifeq ($(origin CXX), default)
70+ CXX = cl
71+ endif
72+ ifeq ($(origin AR), default)
73+ AR = lib
74+ endif
75+ RESCOMP = rc
76+ ]]
77+ end
Original file line number Diff line number Diff line change 4141 premake .MACOSX = " macosx"
4242 premake .MAKEFILE = " Makefile"
4343 premake .MBCS = " MBCS"
44+ premake .MSC = " msc"
4445 premake .NONE = " None"
4546 premake .DEFAULT = " Default"
4647 premake .OBJECTIVEC = " Objective-C"
Original file line number Diff line number Diff line change 481481-- default value should be used.
482482--
483483
484+ msc .tools = {
485+ cc = " cl" ,
486+ cxx = " cl" ,
487+ ar = " lib" ,
488+ rc = " rc"
489+ }
490+
484491 function msc .gettoolname (cfg , tool )
485- return nil
492+ local toolset , version = p .tools .canonical (cfg .toolset or p .MSC )
493+ -- TODO: Support versioning?
494+ return msc .tools [tool ]
486495 end
487496
488497
Original file line number Diff line number Diff line change 2626 end
2727
2828
29+ --
30+ -- Check the selection of tools.
31+ --
32+
33+ function suite .tools_onDefaults ()
34+ prepare ()
35+ test .isequal (" cl" , msc .gettoolname (cfg , " cc" ))
36+ test .isequal (" cl" , msc .gettoolname (cfg , " cxx" ))
37+ test .isequal (" lib" , msc .gettoolname (cfg , " ar" ))
38+ test .isequal (" rc" , msc .gettoolname (cfg , " rc" ))
39+ end
40+
41+ function suite .tools_withMsc ()
42+ toolset " msc"
43+ prepare ()
44+ test .isequal (" cl" , msc .gettoolname (cfg , " cc" ))
45+ test .isequal (" cl" , msc .gettoolname (cfg , " cxx" ))
46+ test .isequal (" lib" , msc .gettoolname (cfg , " ar" ))
47+ test .isequal (" rc" , msc .gettoolname (cfg , " rc" ))
48+ end
49+
50+
51+
2952--
3053-- Check the optimization flags.
3154--
You can’t perform that action at this time.
0 commit comments