Added force includes to MSC tool definition
This commit is contained in:
parent
8e8beb4312
commit
400ad0a0be
@ -20,6 +20,7 @@
|
||||
* Added NoWarnings flag for Visual Studio (xpol)
|
||||
* Added debugcommand for Visual Studio (xpol)
|
||||
* Bug 1674173: Allow source files to have the same name
|
||||
* Added forceinclude() to specify forced include files
|
||||
|
||||
|
||||
-------
|
||||
|
@ -16,7 +16,14 @@
|
||||
--
|
||||
|
||||
function msc.getcppflags(cfg)
|
||||
return {}
|
||||
local flags = {}
|
||||
|
||||
for _, fi in ipairs(cfg.forceincludes) do
|
||||
local fn = project.getrelative(cfg.project, fi)
|
||||
table.insert(flags, string.format('/FI "%s"', fn))
|
||||
end
|
||||
|
||||
return flags
|
||||
end
|
||||
|
||||
|
||||
|
@ -48,3 +48,14 @@
|
||||
prepare()
|
||||
test.isequal({ '/LIBPATH:"../libs"', '/LIBPATH:"libs"' }, msc.getldflags(cfg))
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Check handling of forced includes.
|
||||
--
|
||||
|
||||
function suite.forcedIncludeFiles()
|
||||
forceincludes { "stdafx.h", "include/sys.h" }
|
||||
prepare()
|
||||
test.isequal({'/FI "stdafx.h"', '/FI "include/sys.h"'}, msc.getcppflags(cfg))
|
||||
end
|
||||
|
Reference in New Issue
Block a user