2012-03-07 20:44:48 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2012 Kitware, Inc., Insight Software Consortium
|
|
|
|
|
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
|
|
|
#ifndef cmGeneratorTarget_h
|
|
|
|
#define cmGeneratorTarget_h
|
|
|
|
|
|
|
|
#include "cmStandardIncludes.h"
|
|
|
|
|
2012-09-16 01:54:01 +04:00
|
|
|
class cmComputeLinkInformation;
|
2012-03-07 20:44:48 +04:00
|
|
|
class cmCustomCommand;
|
|
|
|
class cmGlobalGenerator;
|
|
|
|
class cmLocalGenerator;
|
|
|
|
class cmMakefile;
|
|
|
|
class cmSourceFile;
|
|
|
|
class cmTarget;
|
|
|
|
|
|
|
|
class cmGeneratorTarget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmGeneratorTarget(cmTarget*);
|
2012-09-16 01:54:01 +04:00
|
|
|
~cmGeneratorTarget();
|
2012-03-07 20:44:48 +04:00
|
|
|
|
2012-09-17 14:02:24 +04:00
|
|
|
int GetType() const;
|
|
|
|
const char *GetName() const;
|
|
|
|
const char *GetProperty(const char *prop);
|
|
|
|
bool GetPropertyAsBool(const char *prop);
|
|
|
|
std::vector<cmSourceFile*> const& GetSourceFiles();
|
|
|
|
|
2012-03-07 20:44:48 +04:00
|
|
|
cmTarget* Target;
|
|
|
|
cmMakefile* Makefile;
|
|
|
|
cmLocalGenerator* LocalGenerator;
|
|
|
|
cmGlobalGenerator* GlobalGenerator;
|
|
|
|
|
|
|
|
/** Sources classified by purpose. */
|
|
|
|
std::vector<cmSourceFile*> CustomCommands;
|
|
|
|
std::vector<cmSourceFile*> ExtraSources;
|
|
|
|
std::vector<cmSourceFile*> HeaderSources;
|
|
|
|
std::vector<cmSourceFile*> ObjectSources;
|
|
|
|
std::vector<cmSourceFile*> ExternalObjects;
|
2012-03-19 19:25:21 +04:00
|
|
|
std::vector<cmSourceFile*> IDLSources;
|
2012-03-07 20:44:48 +04:00
|
|
|
std::string ModuleDefinitionFile;
|
|
|
|
|
2012-03-07 23:01:46 +04:00
|
|
|
std::map<cmSourceFile const*, std::string> Objects;
|
2012-03-07 23:04:33 +04:00
|
|
|
std::set<cmSourceFile const*> ExplicitObjectName;
|
2012-03-07 23:01:46 +04:00
|
|
|
|
2012-03-09 01:32:03 +04:00
|
|
|
/** Full path with trailing slash to the top-level directory
|
|
|
|
holding object files for this target. Includes the build
|
|
|
|
time config name placeholder if needed for the generator. */
|
|
|
|
std::string ObjectDirectory;
|
|
|
|
|
2012-03-12 22:40:58 +04:00
|
|
|
std::vector<cmTarget*> ObjectLibraries;
|
|
|
|
|
|
|
|
void UseObjectLibraries(std::vector<std::string>& objs);
|
|
|
|
|
2012-09-16 01:54:01 +04:00
|
|
|
std::map<cmStdString, cmComputeLinkInformation*> LinkInformation;
|
|
|
|
|
|
|
|
cmComputeLinkInformation* GetLinkInformation(const char* config);
|
|
|
|
|
2012-09-16 03:16:43 +04:00
|
|
|
void GetAppleArchs(const char* config,
|
|
|
|
std::vector<std::string>& archVec);
|
2012-09-16 03:19:54 +04:00
|
|
|
|
|
|
|
///! Return the rule variable used to create this type of target,
|
|
|
|
// need to add CMAKE_(LANG) for full name.
|
|
|
|
const char* GetCreateRuleVariable();
|
|
|
|
|
2012-09-16 12:03:42 +04:00
|
|
|
/** Get the include directories for this target. */
|
|
|
|
std::vector<std::string> GetIncludeDirectories();
|
|
|
|
|
2012-09-21 01:25:27 +04:00
|
|
|
std::string GetCompileDefinitions(const char *config = 0);
|
2012-09-17 21:56:50 +04:00
|
|
|
|
2012-03-07 20:44:48 +04:00
|
|
|
private:
|
|
|
|
void ClassifySources();
|
2012-03-12 22:40:58 +04:00
|
|
|
void LookupObjectLibraries();
|
2012-03-07 20:44:48 +04:00
|
|
|
|
|
|
|
cmGeneratorTarget(cmGeneratorTarget const&);
|
|
|
|
void operator=(cmGeneratorTarget const&);
|
|
|
|
};
|
|
|
|
|
2012-09-13 02:03:23 +04:00
|
|
|
typedef std::map<cmTarget*, cmGeneratorTarget*> cmGeneratorTargetsType;
|
|
|
|
|
2012-03-07 20:44:48 +04:00
|
|
|
#endif
|