diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-05-22 14:24:59 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-05-22 14:24:59 (GMT) |
commit | 4878c009057cf410fff98d8450e1e7cd2b3072ae (patch) | |
tree | a7ef13ec8a302e2530ec1a1fe5edda141fa9896e /Source/cmLocalGenerator.cxx | |
parent | 6be930f0cfca31d62c3dc498b3fc9e756acca710 (diff) | |
download | CMake-4878c009057cf410fff98d8450e1e7cd2b3072ae.zip CMake-4878c009057cf410fff98d8450e1e7cd2b3072ae.tar.gz CMake-4878c009057cf410fff98d8450e1e7cd2b3072ae.tar.bz2 |
ENH: add the IMPORT keyword to ADD_EXECUTABLE(), which generates an
"imported" executable target. This can then be used e.g. with
ADD_CUSTOM_COMMAND() to generate stuff. It adds a second container for
"imported" targets, and FindTarget() now takes an additional argument bool
useImportedTargets to specify whether you also want to search in the
imported targets or only in the "normal" targets.
Alex
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 110c60f..052663a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -148,8 +148,7 @@ void cmLocalGenerator::TraceDependencies() if ((t->second.GetType() != cmTarget::INSTALL_FILES) && (t->second.GetType() != cmTarget::INSTALL_PROGRAMS) && (t->second.GetType() != cmTarget::INSTALL_DIRECTORY) - && (strncmp(t->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0) - && (t->second.GetPropertyAsBool("IMPORTED") == false)) + && (strncmp(t->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0)) { std::string projectFilename; if (this->IsMakefileGenerator == false) // only use of this variable @@ -1733,7 +1732,7 @@ void cmLocalGenerator (j->second == cmTarget::GENERAL || j->second == linkType)) { // Compute the proper name to use to link this library. - cmTarget* tgt = this->GlobalGenerator->FindTarget(0, lib.c_str()); + cmTarget* tgt = this->GlobalGenerator->FindTarget(0, lib.c_str(), false); bool impexe = (tgt && tgt->GetType() == cmTarget::EXECUTABLE && tgt->GetPropertyAsBool("ENABLE_EXPORTS")); @@ -1963,7 +1962,7 @@ std::string cmLocalGenerator::GetRealDependency(const char* inName, } // Look for a CMake target with the given name. - if(cmTarget* target = this->GlobalGenerator->FindTarget(0, name.c_str())) + if(cmTarget* target = this->GlobalGenerator->FindTarget(0,name.c_str(),false)) { // make sure it is not just a coincidence that the target name // found is part of the inName @@ -2029,8 +2028,8 @@ std::string cmLocalGenerator::GetRealLocation(const char* inName, { std::string outName=inName; // Look for a CMake target with the given name. - cmTarget* target = this->GlobalGenerator->FindTarget(0, inName); - if ((target!=0) && (target->GetType()==cmTarget::EXECUTABLE)) + cmTarget* target = this->GlobalGenerator->FindTarget(0, inName, true); + if ((target != 0) && (target->GetType() == cmTarget::EXECUTABLE)) { outName = target->GetLocation( config ); } |