-
-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug fix for recursive token expansion
added test in gmake2.
- Loading branch information
Tom van Dijck
committed
Oct 16, 2017
1 parent
a15c465
commit bf8f711
Showing
3 changed files
with
88 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
|
||
|
||
local suite = test.declare("gmake2_buildcommands") | ||
local gmake2 = premake.modules.gmake2 | ||
|
||
premake.api.register { | ||
name = 'test_libdir', -- this controls the targetdir for StaticLib projects. | ||
scope = 'config', | ||
kind = 'path', | ||
tokens = true, | ||
pathVars = true, | ||
} | ||
|
||
local wks, prj, cfg | ||
|
||
function suite.setup() | ||
wks = workspace("MyWorkspace") | ||
test_libdir (path.join(_MAIN_SCRIPT_DIR, 'lib')) | ||
configurations { "Debug", "Release" } | ||
prj = test.createProject(wks) | ||
end | ||
|
||
|
||
local function prepare() | ||
wks = test.getWorkspace(wks) | ||
prj = test.getproject(wks, 1) | ||
cfg = test.getconfig(prj, "Debug") | ||
|
||
local toolset = gmake2.getToolSet(cfg) | ||
gmake2.postBuildCmds(cfg, toolset) | ||
end | ||
|
||
|
||
function suite.postbuildcommands() | ||
targetname "blink" | ||
kind "StaticLib" | ||
language "C++" | ||
|
||
postbuildcommands | ||
{ | ||
"mkdir %{cfg.test_libdir}/www", | ||
"mkdir %{cfg.test_libdir}/www" | ||
} | ||
|
||
prepare() | ||
|
||
test.capture [[ | ||
define POSTBUILDCMDS | ||
@echo Running postbuild commands | ||
mkdir lib/www | ||
mkdir lib/www | ||
endef | ||
]] | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters