mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-21 13:48:33 -05:00
VS,Xcode: Add CMakeLists.txt sources without mutating targets
Rather than injecting `CMakeLists.txt` files into each target's `SOURCES`, teach the generators to add them during generation using dedicated code. This avoids mutating the original targets, and avoids polluting `$<TARGET_PROPERTY:foo,SOURCES>` with generator-specific content. This also avoids listing the `CMakeLists.txt` sources in the results of `CMAKE_DEBUG_TARGET_PROPERTIES==SOURCES` so the `RunCMake.TargetSources` test no longer needs a separate case for IDEs.
This commit is contained in:
@@ -65,7 +65,6 @@ public:
|
||||
|
||||
virtual void ReadAndStoreExternalGUID(const std::string& name,
|
||||
const char* path);
|
||||
virtual void AddCMakeListsRules();
|
||||
|
||||
protected:
|
||||
void CreateSingleVCProj(const std::string& lname, cmGeneratorTarget* tgt);
|
||||
@@ -117,10 +116,11 @@ private:
|
||||
FCInfo& fcinfo);
|
||||
void WriteTargetVersionAttribute(std::ostream& fout, cmGeneratorTarget* gt);
|
||||
|
||||
class AllConfigSources;
|
||||
bool WriteGroup(const cmSourceGroup* sg, cmGeneratorTarget* target,
|
||||
std::ostream& fout, const std::string& libName,
|
||||
std::vector<std::string> const& configs,
|
||||
std::map<cmSourceFile const*, size_t> const& sourcesIndex);
|
||||
AllConfigSources const& sources);
|
||||
|
||||
friend class cmLocalVisualStudio7GeneratorFCInfo;
|
||||
friend class cmLocalVisualStudio7GeneratorInternals;
|
||||
|
||||
Reference in New Issue
Block a user