2012-03-07 16:44:48 +00: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"
|
|
|
|
|
|
|
|
class cmCustomCommand;
|
|
|
|
class cmGlobalGenerator;
|
|
|
|
class cmLocalGenerator;
|
|
|
|
class cmMakefile;
|
|
|
|
class cmSourceFile;
|
|
|
|
class cmTarget;
|
|
|
|
|
|
|
|
class cmGeneratorTarget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmGeneratorTarget(cmTarget*);
|
|
|
|
|
2012-09-17 10:02:24 +00: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 16:44:48 +00: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 15:25:21 +00:00
|
|
|
std::vector<cmSourceFile*> IDLSources;
|
2013-04-29 14:48:22 +00:00
|
|
|
std::vector<cmSourceFile*> ResxSources;
|
|
|
|
|
2012-03-07 16:44:48 +00:00
|
|
|
std::string ModuleDefinitionFile;
|
|
|
|
|
2012-03-07 19:01:46 +00:00
|
|
|
std::map<cmSourceFile const*, std::string> Objects;
|
2012-03-07 19:04:33 +00:00
|
|
|
std::set<cmSourceFile const*> ExplicitObjectName;
|
2012-03-07 19:01:46 +00:00
|
|
|
|
2013-04-29 14:48:22 +00:00
|
|
|
std::set<std::string> ExpectedResxHeaders;
|
|
|
|
|
2012-03-08 21:32:03 +00: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 18:40:58 +00:00
|
|
|
std::vector<cmTarget*> ObjectLibraries;
|
|
|
|
|
|
|
|
void UseObjectLibraries(std::vector<std::string>& objs);
|
|
|
|
|
2012-09-15 23:16:43 +00:00
|
|
|
void GetAppleArchs(const char* config,
|
|
|
|
std::vector<std::string>& archVec);
|
2012-09-15 23:19:54 +00: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 08:03:42 +00:00
|
|
|
/** Get the include directories for this target. */
|
2012-10-15 08:42:42 +00:00
|
|
|
std::vector<std::string> GetIncludeDirectories(const char *config);
|
2012-09-16 08:03:42 +00:00
|
|
|
|
2013-07-01 20:28:26 +00:00
|
|
|
bool IsSystemIncludeDirectory(const char *dir, const char *config);
|
|
|
|
|
2012-03-07 16:44:48 +00:00
|
|
|
private:
|
|
|
|
void ClassifySources();
|
2012-03-12 18:40:58 +00:00
|
|
|
void LookupObjectLibraries();
|
2012-03-07 16:44:48 +00:00
|
|
|
|
2013-07-02 12:30:10 +00:00
|
|
|
std::map<std::string, std::vector<std::string> > SystemIncludesCache;
|
|
|
|
|
2012-03-07 16:44:48 +00:00
|
|
|
cmGeneratorTarget(cmGeneratorTarget const&);
|
|
|
|
void operator=(cmGeneratorTarget const&);
|
|
|
|
};
|
|
|
|
|
2012-09-12 22:03:23 +00:00
|
|
|
typedef std::map<cmTarget*, cmGeneratorTarget*> cmGeneratorTargetsType;
|
|
|
|
|
2012-03-07 16:44:48 +00:00
|
|
|
#endif
|