]> git.tdb.fi Git - builder.git/blobdiff - source/target.cpp
Add an option to component to specify whether or not it should be built by default
[builder.git] / source / target.cpp
index e8ed647477fcf82823f06195cfa8a7e43edf7441..3b1685324997fcfebce2273d828e39a0a83ea37a 100644 (file)
@@ -36,6 +36,8 @@ Target *Target::get_buildable_target()
 
 void Target::add_depend(Target *dep)
 {
+       if(dep==this)
+               throw InvalidParameterValue("A target can't depend on itself");
        depends.push_back(dep);
        dep->rdepends.push_back(this);
 }