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

vs200x_config.c « vs200x « actions « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3e943056c1cb96f548cc984e3eb857b7d50bedb4 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
 * \file   vs200x_config.c
 * \brief  Visual Studio 200x configuration generation functions.
 * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
 */

#include "premake.h"
#include "vs200x.h"
#include "vs200x_config.h"


int vs200x_config_character_set(Session sess, Stream strm)
{
	int version = vs200x_get_target_version(sess);
	return vs200x_attribute(strm, 3, "CharacterSet", version > 2003 ? "1" : "2");
}


/**
 * Write out the list of preprocessor symbols as defined by the configuration.
 * This entry is only written if there are values to write.
 */
int vs200x_config_defines(Session sess, Stream strm, Project prj)
{
	Strings values = project_get_config_values(prj, BlockDefines);
	UNUSED(sess);
	if (strings_size(values) > 0)
	{
		return vs200x_list_attribute(strm, 4, "PreprocessorDefinitions", values);
	}
	return OKAY;
}


int vs200x_config_detect_64bit_portability(Session sess, Stream strm, Project prj)
{
	int version = vs200x_get_target_version(sess);
	UNUSED(prj);
	if (version < 2008)
	{
		return vs200x_attribute(strm, 4, "Detect64BitPortabilityProblems", vs200x_true(sess));
	}
	return OKAY;
}


int vs200x_config_runtime_type_info(Session sess, Stream strm, Project prj)
{
	int version = vs200x_get_target_version(sess);
	UNUSED(prj);
	if (version < 2005)
	{
		return vs200x_attribute(strm, 4, "RuntimeTypeInfo", vs200x_true(sess));
	}
	return OKAY;
}


int vs200x_config_use_precompiled_header(Session sess, Stream strm, Project prj)
{
	int version = vs200x_get_target_version(sess);
	UNUSED(prj);
	return vs200x_attribute(strm, 4, "UsePrecompiledHeader", (version > 2003) ? "0" : "2");
}