diff options
| -rw-r--r-- | libcppbuild.cc | 2 | ||||
| -rw-r--r-- | task.cc | 5 | ||||
| -rw-r--r-- | task.h | 1 | ||||
| -rw-r--r-- | task_cc.cc | 5 | ||||
| -rw-r--r-- | task_cc.h | 1 | 
5 files changed, 13 insertions, 1 deletions
| diff --git a/libcppbuild.cc b/libcppbuild.cc index 707cead..0bcbad5 100644 --- a/libcppbuild.cc +++ b/libcppbuild.cc @@ -194,7 +194,7 @@ int main(int argc, char* argv[])  		{  			if(task->targetType() != TargetType::Object)  			{ -				std::cout << task->target() << "\n"; +				std::cout << task->name() << "\n";  			}  		}  		return 0; @@ -35,6 +35,11 @@ int Task::registerDepTasks(const std::list<std::shared_ptr<Task>>& tasks)  	return 0;  } +std::string Task::name() const +{ +	return config.target; +} +  bool Task::dirty()  {  	for(const auto& task : dependsTasks) @@ -26,6 +26,7 @@ public:  	int registerDepTasks(const std::list<std::shared_ptr<Task>>& tasks); +	virtual std::string name() const;  	bool dirty();  	bool ready();  	int run(); @@ -113,6 +113,11 @@ TaskCC::TaskCC(const BuildConfiguration& config, const Settings& settings,  	}  } +std::string TaskCC::name() const +{ +	return target(); +} +  bool TaskCC::dirtyInner()  {  	if(!std::filesystem::exists(sourceFile)) @@ -19,6 +19,7 @@ public:  	       const Settings& settings,  	       const std::string& sourceDir, const std::string& source); +	std::string name() const override;  	bool dirtyInner() override;  	int runInner() override; | 
