Commits

Jason Perkins committed e7a41f9

Add new configuration kind "None" to support non-building Visual Studio configurations (i.e. header-only projects)

  • Participants
  • Parent commits bccc409

Comments (0)

Files changed (4)

src/actions/vstudio/vs2005_solution.lua

 						local architecture = vstudio.archFromConfig(prjcfg, true)
 
 						_p(2,'{%s}.%s.ActiveCfg = %s|%s', prj.uuid, slncfg[cfg], prjplatform, architecture)
-						_p(2,'{%s}.%s.Build.0 = %s|%s', prj.uuid, slncfg[cfg], prjplatform, architecture)
+						if prjcfg.kind ~= premake.NONE then
+							_p(2,'{%s}.%s.Build.0 = %s|%s', prj.uuid, slncfg[cfg], prjplatform, architecture)
+						end
 					end
 				end)
 			end
 		allowed = {
 			"ConsoleApp",
 			"Makefile",
+			"None",
 			"SharedLib",
 			"StaticLib",
 			"WindowedApp",

src/base/premake.lua

 	premake.LINUX       = "linux"
 	premake.MACOSX      = "macosx"
 	premake.MAKEFILE    = "Makefile"
+	premake.NONE        = "None"
 	premake.POSIX       = "posix"
 	premake.PS3         = "ps3"
 	premake.SHAREDLIB   = "SharedLib"

tests/actions/vstudio/sln2005/test_platforms.lua

 	EndGlobalSection
 		]]
 	end
+
+
+---
+-- Configurations with a kind of "None" should be excluded from the build.
+---
+
+	function suite.excludesFromBuild_onNone()
+		project "MyProject"
+		kind "None"
+		prepare()
+		test.capture [[
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Win32.ActiveCfg = Release|Win32
+	EndGlobalSection
+		]]
+	end