2009-03-25 23:04:32 +00:00
|
|
|
--
|
|
|
|
-- tests/test_vs200x_vcproj.lua
|
|
|
|
-- Automated test suite for Visual Studio 2002-2008 C/C++ project generation.
|
|
|
|
-- Copyright (c) 2009 Jason Perkins and the Premake project
|
|
|
|
--
|
|
|
|
|
|
|
|
T.vs200x_vcproj = { }
|
2010-01-06 18:47:00 +00:00
|
|
|
local suite = T.vs200x_vcproj
|
2009-03-25 23:04:32 +00:00
|
|
|
|
2009-05-21 23:17:16 +00:00
|
|
|
|
2009-03-25 23:04:32 +00:00
|
|
|
--
|
|
|
|
-- Configure a solution for testing
|
|
|
|
--
|
|
|
|
|
|
|
|
local sln, prj
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.setup()
|
2009-05-08 20:18:47 +00:00
|
|
|
_ACTION = "vs2005"
|
|
|
|
|
2009-03-25 23:04:32 +00:00
|
|
|
sln = solution "MySolution"
|
|
|
|
configurations { "Debug", "Release" }
|
2009-04-09 20:02:49 +00:00
|
|
|
platforms {}
|
2009-03-25 23:04:32 +00:00
|
|
|
|
2009-05-07 14:30:13 +00:00
|
|
|
project "DotNetProject" -- to test handling of .NET platform in solution
|
|
|
|
language "C#"
|
|
|
|
kind "ConsoleApp"
|
|
|
|
|
2009-03-25 23:04:32 +00:00
|
|
|
prj = project "MyProject"
|
|
|
|
language "C++"
|
|
|
|
kind "ConsoleApp"
|
2009-05-08 20:18:47 +00:00
|
|
|
uuid "AE61726D-187C-E440-BD07-2556188A6565"
|
2009-03-25 23:04:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
local function prepare()
|
|
|
|
io.capture()
|
|
|
|
premake.buildconfigs()
|
2009-05-06 23:37:14 +00:00
|
|
|
sln.vstudio_configs = premake.vstudio_buildconfigs(sln)
|
2009-03-25 23:04:32 +00:00
|
|
|
|
2009-05-07 14:30:13 +00:00
|
|
|
local cfg = premake.getconfig(sln.projects[2])
|
2009-03-25 23:04:32 +00:00
|
|
|
cfg.name = prj.name
|
|
|
|
cfg.blocks = prj.blocks
|
|
|
|
prj = cfg
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Make sure I've got the basic layout correct
|
|
|
|
--
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.BasicLayout()
|
2009-03-25 23:04:32 +00:00
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj(prj)
|
|
|
|
test.capture [[
|
|
|
|
<?xml version="1.0" encoding="Windows-1252"?>
|
|
|
|
<VisualStudioProject
|
|
|
|
ProjectType="Visual C++"
|
|
|
|
Version="8.00"
|
|
|
|
Name="MyProject"
|
|
|
|
ProjectGUID="{AE61726D-187C-E440-BD07-2556188A6565}"
|
|
|
|
RootNamespace="MyProject"
|
|
|
|
Keyword="Win32Proj"
|
|
|
|
>
|
|
|
|
<Platforms>
|
|
|
|
<Platform
|
|
|
|
Name="Win32"
|
|
|
|
/>
|
|
|
|
</Platforms>
|
|
|
|
<ToolFiles>
|
|
|
|
</ToolFiles>
|
|
|
|
<Configurations>
|
|
|
|
<Configuration
|
|
|
|
Name="Debug|Win32"
|
|
|
|
OutputDirectory="."
|
2009-05-06 23:25:50 +00:00
|
|
|
IntermediateDirectory="obj\Debug\MyProject"
|
2009-03-25 23:04:32 +00:00
|
|
|
ConfigurationType="1"
|
|
|
|
CharacterSet="2"
|
|
|
|
>
|
|
|
|
<Tool
|
|
|
|
Name="VCPreBuildEventTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCCustomBuildTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCXMLDataGeneratorTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCWebServiceProxyGeneratorTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCMIDLTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCCLCompilerTool"
|
|
|
|
Optimization="0"
|
|
|
|
BasicRuntimeChecks="3"
|
|
|
|
RuntimeLibrary="3"
|
|
|
|
EnableFunctionLevelLinking="true"
|
|
|
|
UsePrecompiledHeader="0"
|
|
|
|
WarningLevel="3"
|
|
|
|
Detect64BitPortabilityProblems="true"
|
2010-01-06 18:47:00 +00:00
|
|
|
ProgramDataBaseFileName="$(OutDir)\MyProject.pdb"
|
2009-03-25 23:04:32 +00:00
|
|
|
DebugInformationFormat="0"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCManagedResourceCompilerTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCResourceCompilerTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCPreLinkEventTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCLinkerTool"
|
|
|
|
OutputFile="$(OutDir)\MyProject.exe"
|
|
|
|
LinkIncremental="2"
|
|
|
|
AdditionalLibraryDirectories=""
|
|
|
|
GenerateDebugInformation="false"
|
|
|
|
SubSystem="1"
|
|
|
|
EntryPointSymbol="mainCRTStartup"
|
|
|
|
TargetMachine="1"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCALinkTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCManifestTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCXDCMakeTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCBscMakeTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCFxCopTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCAppVerifierTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCWebDeploymentTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCPostBuildEventTool"
|
|
|
|
/>
|
|
|
|
</Configuration>
|
|
|
|
<Configuration
|
|
|
|
Name="Release|Win32"
|
|
|
|
OutputDirectory="."
|
2009-05-06 23:25:50 +00:00
|
|
|
IntermediateDirectory="obj\Release\MyProject"
|
2009-03-25 23:04:32 +00:00
|
|
|
ConfigurationType="1"
|
|
|
|
CharacterSet="2"
|
|
|
|
>
|
|
|
|
<Tool
|
|
|
|
Name="VCPreBuildEventTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCCustomBuildTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCXMLDataGeneratorTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCWebServiceProxyGeneratorTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCMIDLTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCCLCompilerTool"
|
|
|
|
Optimization="0"
|
|
|
|
BasicRuntimeChecks="3"
|
|
|
|
RuntimeLibrary="3"
|
|
|
|
EnableFunctionLevelLinking="true"
|
|
|
|
UsePrecompiledHeader="0"
|
|
|
|
WarningLevel="3"
|
|
|
|
Detect64BitPortabilityProblems="true"
|
2010-01-06 18:47:00 +00:00
|
|
|
ProgramDataBaseFileName="$(OutDir)\MyProject.pdb"
|
2009-03-25 23:04:32 +00:00
|
|
|
DebugInformationFormat="0"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCManagedResourceCompilerTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCResourceCompilerTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCPreLinkEventTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCLinkerTool"
|
|
|
|
OutputFile="$(OutDir)\MyProject.exe"
|
|
|
|
LinkIncremental="2"
|
|
|
|
AdditionalLibraryDirectories=""
|
|
|
|
GenerateDebugInformation="false"
|
|
|
|
SubSystem="1"
|
|
|
|
EntryPointSymbol="mainCRTStartup"
|
|
|
|
TargetMachine="1"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCALinkTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCManifestTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCXDCMakeTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCBscMakeTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCFxCopTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCAppVerifierTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCWebDeploymentTool"
|
|
|
|
/>
|
|
|
|
<Tool
|
|
|
|
Name="VCPostBuildEventTool"
|
|
|
|
/>
|
|
|
|
</Configuration>
|
|
|
|
</Configurations>
|
|
|
|
<References>
|
|
|
|
</References>
|
|
|
|
<Files>
|
|
|
|
</Files>
|
|
|
|
<Globals>
|
|
|
|
</Globals>
|
|
|
|
</VisualStudioProject>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Test multiple platforms
|
|
|
|
--
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.Platforms_OnMultiplePlatforms()
|
2009-03-25 23:04:32 +00:00
|
|
|
platforms { "x32", "x64" }
|
|
|
|
prepare()
|
2009-05-06 23:25:50 +00:00
|
|
|
|
2009-03-25 23:04:32 +00:00
|
|
|
premake.vs200x_vcproj(prj)
|
2009-05-06 23:25:50 +00:00
|
|
|
local result = io.endcapture()
|
2009-03-25 23:04:32 +00:00
|
|
|
test.istrue(result:find '<Configuration\r\n\t\t\tName="Debug|Win32"\r\n')
|
|
|
|
test.istrue(result:find '<Configuration\r\n\t\t\tName="Release|Win32"\r\n')
|
|
|
|
test.istrue(result:find '<Configuration\r\n\t\t\tName="Debug|x64"\r\n')
|
|
|
|
test.istrue(result:find '<Configuration\r\n\t\t\tName="Release|x64"\r\n')
|
|
|
|
end
|
2009-05-06 23:25:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Test x64 handling
|
|
|
|
--
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.PlatformsList_OnX64()
|
2009-05-06 23:25:50 +00:00
|
|
|
platforms { "Native", "x64" }
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_platforms(prj)
|
|
|
|
test.capture [[
|
|
|
|
<Platforms>
|
|
|
|
<Platform
|
|
|
|
Name="Win32"
|
|
|
|
/>
|
|
|
|
<Platform
|
|
|
|
Name="x64"
|
|
|
|
/>
|
|
|
|
</Platforms>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-07 14:30:13 +00:00
|
|
|
--
|
|
|
|
-- Test Xbox360 handling
|
|
|
|
--
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.PlatformsList_OnXbox360()
|
2009-05-07 14:30:13 +00:00
|
|
|
platforms { "Native", "Xbox360" }
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_platforms(prj)
|
|
|
|
test.capture [[
|
|
|
|
<Platforms>
|
|
|
|
<Platform
|
|
|
|
Name="Win32"
|
|
|
|
/>
|
|
|
|
<Platform
|
|
|
|
Name="Xbox 360"
|
|
|
|
/>
|
|
|
|
</Platforms>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.CompilerBlock_OnXbox360()
|
2009-05-07 14:30:13 +00:00
|
|
|
platforms { "Xbox360" }
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_VCCLCompilerTool(premake.getconfig(prj, "Debug", "Xbox360"))
|
|
|
|
test.capture [[
|
|
|
|
<Tool
|
|
|
|
Name="VCCLX360CompilerTool"
|
|
|
|
Optimization="0"
|
|
|
|
BasicRuntimeChecks="3"
|
|
|
|
RuntimeLibrary="3"
|
|
|
|
EnableFunctionLevelLinking="true"
|
|
|
|
UsePrecompiledHeader="0"
|
|
|
|
WarningLevel="3"
|
|
|
|
Detect64BitPortabilityProblems="true"
|
2010-01-06 18:47:00 +00:00
|
|
|
ProgramDataBaseFileName="$(OutDir)\MyProject.pdb"
|
2009-05-07 14:30:13 +00:00
|
|
|
DebugInformationFormat="0"
|
|
|
|
/>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2009-05-06 23:25:50 +00:00
|
|
|
--
|
|
|
|
-- Test PS3 handling
|
|
|
|
--
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.PlatformsList_OnPS3()
|
2009-05-06 23:25:50 +00:00
|
|
|
platforms { "Native", "PS3" }
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_platforms(prj)
|
|
|
|
test.capture [[
|
|
|
|
<Platforms>
|
|
|
|
<Platform
|
|
|
|
Name="Win32"
|
|
|
|
/>
|
|
|
|
</Platforms>
|
|
|
|
]]
|
|
|
|
end
|
2009-05-07 14:30:13 +00:00
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.CompilerBlock_OnPS3()
|
2009-05-07 14:30:13 +00:00
|
|
|
platforms { "PS3" }
|
|
|
|
flags { "Symbols" }
|
|
|
|
includedirs { "include/pkg1", "include/pkg2" }
|
|
|
|
defines { "DEFINE1", "DEFINE2" }
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_VCCLCompilerTool_GCC(premake.getconfig(prj, "Debug", "PS3"))
|
|
|
|
test.capture [[
|
|
|
|
<Tool
|
|
|
|
Name="VCCLCompilerTool"
|
|
|
|
AdditionalOptions="-g"
|
|
|
|
AdditionalIncludeDirectories="include\pkg1;include\pkg2"
|
|
|
|
PreprocessorDefinitions="DEFINE1;DEFINE2"
|
2010-01-06 18:47:00 +00:00
|
|
|
ProgramDataBaseFileName="$(OutDir)\MyProject.pdb"
|
2009-05-07 14:30:13 +00:00
|
|
|
DebugInformationFormat="0"
|
|
|
|
CompileAs="0"
|
|
|
|
/>
|
|
|
|
]]
|
|
|
|
end
|
2009-05-08 20:18:47 +00:00
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.LinkerBlock_OnPS3ConsoleApp()
|
2009-05-08 20:33:38 +00:00
|
|
|
platforms { "PS3" }
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_VCLinkerTool_GCC(premake.getconfig(prj, "Debug", "PS3"))
|
|
|
|
test.capture [[
|
|
|
|
<Tool
|
|
|
|
Name="VCLinkerTool"
|
|
|
|
AdditionalOptions="-s"
|
|
|
|
OutputFile="$(OutDir)\MyProject.elf"
|
|
|
|
LinkIncremental="0"
|
|
|
|
AdditionalLibraryDirectories=""
|
|
|
|
GenerateManifest="false"
|
|
|
|
ProgramDatabaseFile=""
|
|
|
|
RandomizedBaseAddress="1"
|
|
|
|
DataExecutionPrevention="0"
|
|
|
|
/>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.LinkerBlock_OnPS3StaticLib()
|
2009-05-08 20:33:38 +00:00
|
|
|
platforms { "PS3" }
|
|
|
|
kind "StaticLib"
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_VCLinkerTool_GCC(premake.getconfig(prj, "Debug", "PS3"))
|
|
|
|
test.capture [[
|
|
|
|
<Tool
|
|
|
|
Name="VCLibrarianTool"
|
|
|
|
AdditionalOptions="-s"
|
|
|
|
OutputFile="$(OutDir)\libMyProject.a"
|
|
|
|
/>
|
|
|
|
]]
|
|
|
|
end
|
2009-05-08 20:40:56 +00:00
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.LinkerBlock_OnPS3SharedLink()
|
2009-05-08 20:40:56 +00:00
|
|
|
platforms { "PS3" }
|
|
|
|
links { "MyLibrary" }
|
|
|
|
project "MyLibrary"
|
|
|
|
language "C++"
|
|
|
|
kind "SharedLib"
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_VCLinkerTool_GCC(premake.getconfig(prj, "Debug", "PS3"))
|
|
|
|
|
|
|
|
test.capture [[
|
|
|
|
<Tool
|
|
|
|
Name="VCLinkerTool"
|
|
|
|
AdditionalOptions="-s"
|
|
|
|
AdditionalDependencies="libMyLibrary.a"
|
|
|
|
OutputFile="$(OutDir)\MyProject.elf"
|
|
|
|
LinkIncremental="0"
|
|
|
|
AdditionalLibraryDirectories=""
|
|
|
|
GenerateManifest="false"
|
|
|
|
ProgramDatabaseFile=""
|
|
|
|
RandomizedBaseAddress="1"
|
|
|
|
DataExecutionPrevention="0"
|
|
|
|
/>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2009-05-21 23:17:16 +00:00
|
|
|
--
|
|
|
|
-- Test manifest file handling.
|
|
|
|
--
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.VCManifestTool_OnNoManifests()
|
2009-05-21 23:17:16 +00:00
|
|
|
files { "hello.c", "goodbye.c" }
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_VCManifestTool(premake.getconfig(prj, "Debug"))
|
|
|
|
test.capture [[
|
|
|
|
<Tool
|
|
|
|
Name="VCManifestTool"
|
|
|
|
/>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.VCManifestTool_OnNoManifests()
|
2009-05-21 23:17:16 +00:00
|
|
|
files { "hello.c", "project1.manifest", "goodbye.c", "project2.manifest" }
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_VCManifestTool(premake.getconfig(prj, "Debug"))
|
|
|
|
test.capture [[
|
|
|
|
<Tool
|
|
|
|
Name="VCManifestTool"
|
|
|
|
AdditionalManifestFiles="project1.manifest;project2.manifest"
|
|
|
|
/>
|
|
|
|
]]
|
|
|
|
end
|
2009-06-30 00:08:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Test precompiled header handling
|
|
|
|
--
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.PCH_OnWindows()
|
2009-06-30 00:08:16 +00:00
|
|
|
files { "afxwin.cpp" }
|
|
|
|
pchsource "afxwin.cpp"
|
|
|
|
prepare()
|
|
|
|
_VS.files(prj, "afxwin.cpp", "Item", 1)
|
|
|
|
test.capture [[
|
|
|
|
<File
|
|
|
|
RelativePath="afxwin.cpp"
|
|
|
|
>
|
|
|
|
<FileConfiguration
|
|
|
|
Name="Debug|Win32"
|
|
|
|
>
|
|
|
|
<Tool
|
|
|
|
Name="VCCLCompilerTool"
|
|
|
|
UsePrecompiledHeader="1"
|
|
|
|
/>
|
|
|
|
</FileConfiguration>
|
|
|
|
<FileConfiguration
|
|
|
|
Name="Release|Win32"
|
|
|
|
>
|
|
|
|
<Tool
|
|
|
|
Name="VCCLCompilerTool"
|
|
|
|
UsePrecompiledHeader="1"
|
|
|
|
/>
|
|
|
|
</FileConfiguration>
|
|
|
|
</File>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.PCH_OnXbox360()
|
2009-06-30 00:08:16 +00:00
|
|
|
files { "afxwin.cpp" }
|
|
|
|
pchsource "afxwin.cpp"
|
|
|
|
platforms { "Xbox360" }
|
|
|
|
prepare()
|
|
|
|
sln.vstudio_configs = premake.vstudio_buildconfigs(sln)
|
|
|
|
_VS.files(prj, "afxwin.cpp", "Item", 1)
|
|
|
|
test.capture [[
|
|
|
|
<File
|
|
|
|
RelativePath="afxwin.cpp"
|
|
|
|
>
|
|
|
|
<FileConfiguration
|
|
|
|
Name="Debug|Xbox 360"
|
|
|
|
>
|
|
|
|
<Tool
|
|
|
|
Name="VCCLX360CompilerTool"
|
|
|
|
UsePrecompiledHeader="1"
|
|
|
|
/>
|
|
|
|
</FileConfiguration>
|
|
|
|
<FileConfiguration
|
|
|
|
Name="Release|Xbox 360"
|
|
|
|
>
|
|
|
|
<Tool
|
|
|
|
Name="VCCLX360CompilerTool"
|
|
|
|
UsePrecompiledHeader="1"
|
|
|
|
/>
|
|
|
|
</FileConfiguration>
|
|
|
|
</File>
|
|
|
|
]]
|
|
|
|
end
|
2009-09-29 20:28:13 +00:00
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
|
2009-09-29 20:28:13 +00:00
|
|
|
--
|
|
|
|
-- Floating point flag tests
|
|
|
|
--
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.CompilerBlock_OnFpFast()
|
2009-09-29 20:28:13 +00:00
|
|
|
flags { "FloatFast" }
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_VCCLCompilerTool(premake.getconfig(prj, "Debug"))
|
|
|
|
test.capture [[
|
|
|
|
<Tool
|
|
|
|
Name="VCCLCompilerTool"
|
|
|
|
Optimization="0"
|
|
|
|
BasicRuntimeChecks="3"
|
|
|
|
RuntimeLibrary="3"
|
|
|
|
EnableFunctionLevelLinking="true"
|
|
|
|
FloatingPointModel="2"
|
|
|
|
UsePrecompiledHeader="0"
|
|
|
|
WarningLevel="3"
|
|
|
|
Detect64BitPortabilityProblems="true"
|
2010-01-06 18:47:00 +00:00
|
|
|
ProgramDataBaseFileName="$(OutDir)\MyProject.pdb"
|
2009-09-29 20:28:13 +00:00
|
|
|
DebugInformationFormat="0"
|
|
|
|
/>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
2010-01-06 18:47:00 +00:00
|
|
|
function suite.CompilerBlock_OnFpStrict()
|
2009-09-29 20:28:13 +00:00
|
|
|
flags { "FloatStrict" }
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_VCCLCompilerTool(premake.getconfig(prj, "Debug"))
|
|
|
|
test.capture [[
|
|
|
|
<Tool
|
|
|
|
Name="VCCLCompilerTool"
|
|
|
|
Optimization="0"
|
|
|
|
BasicRuntimeChecks="3"
|
|
|
|
RuntimeLibrary="3"
|
|
|
|
EnableFunctionLevelLinking="true"
|
|
|
|
FloatingPointModel="1"
|
|
|
|
UsePrecompiledHeader="0"
|
|
|
|
WarningLevel="3"
|
|
|
|
Detect64BitPortabilityProblems="true"
|
2010-01-06 18:47:00 +00:00
|
|
|
ProgramDataBaseFileName="$(OutDir)\MyProject.pdb"
|
|
|
|
DebugInformationFormat="0"
|
|
|
|
/>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- PDB file naming tests
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.CompilerBlock_OnTargetName()
|
|
|
|
targetname "foob"
|
|
|
|
prepare()
|
|
|
|
premake.vs200x_vcproj_VCCLCompilerTool(premake.getconfig(prj, "Debug"))
|
|
|
|
test.capture [[
|
|
|
|
<Tool
|
|
|
|
Name="VCCLCompilerTool"
|
|
|
|
Optimization="0"
|
|
|
|
BasicRuntimeChecks="3"
|
|
|
|
RuntimeLibrary="3"
|
|
|
|
EnableFunctionLevelLinking="true"
|
|
|
|
UsePrecompiledHeader="0"
|
|
|
|
WarningLevel="3"
|
|
|
|
Detect64BitPortabilityProblems="true"
|
|
|
|
ProgramDataBaseFileName="$(OutDir)\foob.pdb"
|
2009-09-29 20:28:13 +00:00
|
|
|
DebugInformationFormat="0"
|
|
|
|
/>
|
|
|
|
]]
|
|
|
|
end
|