2001-04-11 22:59:02 +04:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
Program: Insight Segmentation & Registration Toolkit
|
|
|
|
Module: $RCSfile$
|
|
|
|
Language: C++
|
|
|
|
Date: $Date$
|
|
|
|
Version: $Revision$
|
|
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2000 National Library of Medicine
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
See COPYRIGHT.txt for copyright details.
|
|
|
|
|
|
|
|
=========================================================================*/
|
|
|
|
#ifndef cmTarget_h
|
|
|
|
#define cmTarget_h
|
|
|
|
|
|
|
|
#include "cmStandardIncludes.h"
|
|
|
|
#include "cmCustomCommand.h"
|
2001-04-25 00:49:12 +04:00
|
|
|
#include "cmSourceFile.h"
|
2001-04-11 22:59:02 +04:00
|
|
|
|
|
|
|
/** \class cmTarget
|
|
|
|
* \brief Represent a library or executable target loaded from a makefile.
|
|
|
|
*
|
|
|
|
* cmTarget represents a target loaded from
|
|
|
|
* a makefile.
|
|
|
|
*/
|
|
|
|
class cmTarget
|
|
|
|
{
|
|
|
|
public:
|
2001-04-19 21:28:46 +04:00
|
|
|
/**
|
|
|
|
* is this target a library?
|
|
|
|
*/
|
|
|
|
bool IsALibrary() const { return m_IsALibrary; }
|
|
|
|
bool GetIsALibrary() const { return m_IsALibrary; }
|
|
|
|
void SetIsALibrary(bool f) { m_IsALibrary = f; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the list of the custom commands for this target
|
|
|
|
*/
|
|
|
|
const std::vector<cmCustomCommand> &GetCustomCommands() const {return m_CustomCommands;}
|
|
|
|
std::vector<cmCustomCommand> &GetCustomCommands() {return m_CustomCommands;}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the list of the source lists used by this target
|
|
|
|
*/
|
2001-04-25 00:49:12 +04:00
|
|
|
const std::vector<std::string> &GetSourceLists() const
|
|
|
|
{return m_SourceLists;}
|
2001-04-19 21:28:46 +04:00
|
|
|
std::vector<std::string> &GetSourceLists() {return m_SourceLists;}
|
|
|
|
|
2001-04-25 00:49:12 +04:00
|
|
|
/**
|
|
|
|
* Get the list of the source files used by this target
|
|
|
|
*/
|
|
|
|
const std::vector<cmSourceFile> &GetSourceFiles() const
|
|
|
|
{return m_SourceFiles;}
|
|
|
|
std::vector<cmSourceFile> &GetSourceFiles() {return m_SourceFiles;}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Generate the SourceFilesList from the SourceLists. This should only be
|
|
|
|
* done once to be safe.
|
|
|
|
*/
|
|
|
|
void GenerateSourceFilesFromSourceLists(const cmMakefile &mf);
|
|
|
|
|
2001-04-19 21:28:46 +04:00
|
|
|
private:
|
2001-04-11 22:59:02 +04:00
|
|
|
std::vector<cmCustomCommand> m_CustomCommands;
|
|
|
|
std::vector<std::string> m_SourceLists;
|
2001-04-19 21:28:46 +04:00
|
|
|
bool m_IsALibrary;
|
2001-04-25 00:49:12 +04:00
|
|
|
std::vector<cmSourceFile> m_SourceFiles;
|
2001-04-11 22:59:02 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::map<std::string,cmTarget> cmTargets;
|
|
|
|
|
|
|
|
#endif
|