|
1 | 1 | -- Tests/examples helpers
|
2 | 2 |
|
3 |
| -require('vstudio') |
4 |
| - |
5 |
| -function disableFastUpToDateCheck(prj, cfg) |
6 |
| - premake.vstudio.vc2010.element("DisableFastUpToDateCheck", nil, "true") |
7 |
| -end |
8 |
| - |
9 |
| -premake.override(premake.vstudio.cs2005.elements, "projectProperties", |
10 |
| - function(oldfn, prj) |
11 |
| - local elements = oldfn(prj) |
12 |
| - if (string.endswith(prj.filename, ".CSharp") and |
13 |
| - not string.endswith(prj.filename, ".Tests.CSharp") and |
14 |
| - not string.endswith(prj.filename, ".Parser.CSharp")) then |
15 |
| - elements = table.join(elements, {disableFastUpToDateCheck}) |
16 |
| - end |
17 |
| - return elements |
18 |
| - end) |
19 |
| - |
20 |
| -premake.override(premake.vstudio.vc2010.elements, "globals", |
21 |
| - function(oldfn, prj, cfg) |
22 |
| - local elements = oldfn(prj, cfg) |
23 |
| - if (string.endswith(prj.filename, ".CLI") and |
24 |
| - not string.endswith(prj.filename, ".Tests.CLI") and |
25 |
| - not string.endswith(prj.filename, ".Parser.CLI") and |
26 |
| - prj.filename ~= "CppSharp.CLI") then |
27 |
| - elements = table.join(elements, {disableFastUpToDateCheck}) |
28 |
| - end |
29 |
| - return elements |
30 |
| - end) |
31 |
| - |
32 | 3 | function SetupExampleProject()
|
33 | 4 | kind "ConsoleApp"
|
34 | 5 | language "C#"
|
@@ -159,6 +130,11 @@ function SetupTestNativeProject(name, depends)
|
159 | 130 | if depends ~= nil then
|
160 | 131 | links { depends .. ".Native" }
|
161 | 132 | end
|
| 133 | + |
| 134 | + if string.startswith(_ACTION, "vs") then |
| 135 | + postbuildcommands { "type nul > " .. SafePath(path.join(libdir, name .. ".Native.timestamp.cs")) } |
| 136 | + postbuildcommands { "type nul > " .. SafePath(path.join(libdir, name .. ".Native.timestamp.cpp")) } |
| 137 | + end |
162 | 138 | end
|
163 | 139 |
|
164 | 140 | function LinkNUnit()
|
@@ -221,6 +197,11 @@ function SetupTestProjectsCSharp(name, depends, extraFiles, suffix)
|
221 | 197 |
|
222 | 198 | links(linktable)
|
223 | 199 |
|
| 200 | + if string.startswith(_ACTION, "vs") then |
| 201 | + files { path.join(libdir, name .. ".Native.timestamp.cs") } |
| 202 | + links { name .. ".Gen" } |
| 203 | + end |
| 204 | + |
224 | 205 | project(name .. ".Tests.CSharp")
|
225 | 206 | SetupManagedTestProject()
|
226 | 207 |
|
@@ -276,6 +257,11 @@ function SetupTestProjectsCLI(name, extraFiles, suffix)
|
276 | 257 | includedirs { path.join(testsdir, name), incdir }
|
277 | 258 | links { name .. ".Native" }
|
278 | 259 |
|
| 260 | + if string.startswith(_ACTION, "vs") then |
| 261 | + files { path.join(libdir, name .. ".Native.timestamp.cpp") } |
| 262 | + links { name .. ".Gen" } |
| 263 | + end |
| 264 | + |
279 | 265 | project(name .. ".Tests.CLI")
|
280 | 266 | SetupManagedTestProject()
|
281 | 267 |
|
|
0 commit comments