diff options
author | Brad King <brad.king@kitware.com> | 2007-06-18 15:59:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-06-18 15:59:23 (GMT) |
commit | 35936433e11728397dcdb2beab615674bfa79ec7 (patch) | |
tree | 8222a4daea955055c852d6db058421a570a8f6b2 /Source/cmTarget.h | |
parent | ef81ac50e5d6e981088c00e822fde538d9da9e37 (diff) | |
download | CMake-35936433e11728397dcdb2beab615674bfa79ec7.zip CMake-35936433e11728397dcdb2beab615674bfa79ec7.tar.gz CMake-35936433e11728397dcdb2beab615674bfa79ec7.tar.bz2 |
ENH: Merging changes from branch CMake-SourceFile2-b between tags
CMake-SourceFile2-bp and CMake-SourceFile2-b-mp1 to trunk. This
commit is surrounded by tags CMake-SourceFile2-b-mp1-pre and
CMake-SourceFile2-b-mp1-post on the trunk.
The changes re-implement cmSourceFile and the use of it to allow
instances to be created much earlier. The use of cmSourceFileLocation
allows locating a source file referenced by a user to be much simpler
and more robust. The two SetName methods are no longer needed so some
duplicate code has been removed. The strange "SourceName" stuff is
gone. Code that created cmSourceFile instances on the stack and then
sent them to cmMakefile::AddSource has been simplified and converted
to getting cmSourceFile instances from cmMakefile. The CPluginAPI has
preserved the old API through a compatibility interface.
Source lists are gone. Targets now get real instances of cmSourceFile
right away instead of storing a list of strings until the final pass.
TraceVSDependencies has been re-written to avoid the use of
SourceName. It is now called TraceDependencies since it is not just
for VS. It is now implemented with a helper object which makes the
code simpler.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r-- | Source/cmTarget.h | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h index e8b17ee..c87f56d 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -73,16 +73,6 @@ public: std::vector<cmCustomCommand> &GetPostBuildCommands() {return this->PostBuildCommands;} - /** - * Get the list of the source lists used by this target - */ - std::vector<std::string> const& GetSourceLists() {return this->SourceLists;} - - void AddSourceListEntry(const char* src) - { this->SourceLists.push_back(src); } - void SetSourceList(std::vector<std::string> const& srcs) - { this->SourceLists = srcs; } - ///! Return the list of frameworks being linked to this target std::vector<std::string> &GetFrameworks() {return this->Frameworks;} @@ -94,6 +84,12 @@ public: void AddSourceFile(cmSourceFile* sf) { this->SourceFiles.push_back(sf); } /** + * Add sources to the target. + */ + void AddSources(std::vector<std::string> const& srcs); + cmSourceFile* AddSource(const char* src); + + /** * Get the list of the source files used by this target */ enum LinkLibraryType {GENERAL, DEBUG, OPTIMIZED}; @@ -149,12 +145,6 @@ public: bool GetHaveInstallRule() { return this->HaveInstallRule; } void SetHaveInstallRule(bool h) { this->HaveInstallRule = h; } - /** - * Generate the SourceFilesList from the SourceLists. This should only be - * done once to be safe. - */ - void GenerateSourceFilesFromSourceLists(cmMakefile &mf); - /** Add a utility on which this project depends. A utility is an executable * name as would be specified to the ADD_EXECUTABLE or UTILITY_SOURCE * commands. It is not a full path nor does it have an extension. @@ -193,7 +183,7 @@ public: * Trace through the source files in this target and add al source files * that they depend on, used by all generators */ - void TraceVSDependencies(std::string projName, cmMakefile *mf); + void TraceDependencies(const char* vsProjectFile); ///! Return the prefered linker language for this target const char* GetLinkerLanguage(cmGlobalGenerator*); @@ -302,14 +292,6 @@ private: const LibraryID& lib, const LibraryID& dep); - /* - * Check custom commands for known targets and add a target-level - * dependency. - */ - void CheckForTargetsAsCommand(const cmCustomCommand& cc); - void CheckForTargetsAsCommand(const std::vector<cmCustomCommand>& commands); - - /** * Emits the library \a lib and all its dependencies into link_line. * \a emitted keeps track of the libraries that have been emitted to @@ -379,7 +361,6 @@ private: std::vector<cmCustomCommand> PreBuildCommands; std::vector<cmCustomCommand> PreLinkCommands; std::vector<cmCustomCommand> PostBuildCommands; - std::vector<std::string> SourceLists; TargetType TargetTypeValue; std::vector<cmSourceFile*> SourceFiles; LinkLibraryVectorType LinkLibraries; |