Welcome to mirror list, hosted at ThFree Co, Russian Federation.

fn_configuration.c « script « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4a6154c3099b96a415411f45ad2ea8d1b5534681 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
 * \file   fn_configuration.c
 * \brief  Implements the configuration() function.
 * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
 */

#include "premake.h"
#include "script_internal.h"


/**
 * Specify the build configurations for a solution.
 */
int fn_configuration(lua_State* L)
{
	/* if there are parameters, create a new configuration block */
	if (lua_gettop(L) > 0)
	{
		/* get the active object, which will contain this new configuration */
		if (!script_internal_get_active_object(L, SolutionObject | ProjectObject, IS_REQUIRED))
		{
			return 0;
		}

		/* create a new configuration block in the container */
		script_internal_create_block(L);

		/* populate the list of terms from the arguments */
		script_internal_get_active_object(L, BlockObject, IS_REQUIRED);
		fn_accessor_set_list_value(L, &BlockFieldInfo[BlockTerms]);
	}

	script_internal_get_active_object(L, BlockObject, IS_OPTIONAL);
	return 1;
}