Commits

Julien Hamaide committed ed6f067 Merge

Merge 1b6243d

Comments (0)

Files changed (3)

src/actions/make/make_cpp.lua

File contents unchanged.

tests/actions/make/cpp/test_flags.lua

+--
+-- tests/actions/make/cpp/test_flags.lua
+-- Tests compiler and linker flags for Makefiles.
+-- Copyright (c) 2012 Jason Perkins and the Premake project
+--
+	
+	T.make_flags = {}
+	local suite = T.make_flags
+	local make = premake.make
+	local cpp = premake.make.cpp
+	local project = premake5.project
+
+
+--
+-- Setup
+--
+	
+	local sln, prj, cfg
+
+	function suite.setup()
+		sln = test.createsolution()
+	end
+
+	local function prepare()
+		prj = premake.solution.getproject_ng(sln, 1)
+		cfg = project.getconfig(prj, "Debug")
+		cpp.flags(cfg, premake.tools.gcc)
+	end
+	
+
+--
+-- Include directories should be relative and space separated.
+--
+
+	function suite.includeDirs()
+		includedirs { "src/include", "../include" }
+		prepare()
+		test.capture [[
+  DEFINES   += 
+  INCLUDES  += -Isrc/include -I../include
+		]]
+	end

tests/premake4.lua

 	
 	-- Makefile C/C++ projects
 	dofile("actions/make/cpp/test_file_rules.lua")
+	dofile("actions/make/cpp/test_flags.lua")
 	dofile("actions/make/cpp/test_make_pch.lua")
 	dofile("actions/make/cpp/test_make_linking.lua")
 	dofile("actions/make/cpp/test_objects.lua")