diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-07-01 14:57:39 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-07-01 14:57:39 (GMT) |
commit | 7f2e7443bfb6ad7c1148d0ac4f370b251d663fb3 (patch) | |
tree | 7ae9592d8ac325d54ea13d73e48750e8cbd15e28 /Source/cmTarget.cxx | |
parent | d5814719d60ba3b97fa1189de49fd16f405c6ae0 (diff) | |
download | CMake-7f2e7443bfb6ad7c1148d0ac4f370b251d663fb3.zip CMake-7f2e7443bfb6ad7c1148d0ac4f370b251d663fb3.tar.gz CMake-7f2e7443bfb6ad7c1148d0ac4f370b251d663fb3.tar.bz2 |
ENH: added Alexander's target property TYPE
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index a3fb589..4bcfda9 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -743,6 +743,36 @@ const char *cmTarget::GetProperty(const char* prop) this->UpdateLocation(); } + // the type property returns what type the target is + if (!strcmp(prop,"TYPE")) + { + switch( this->GetType() ) + { + case cmTarget::STATIC_LIBRARY: + return "STATIC_LIBRARY"; + break; + case cmTarget::MODULE_LIBRARY: + return "MODULE_LIBRARY"; + break; + case cmTarget::SHARED_LIBRARY: + return "SHARED_LIBRARY"; + break; + case cmTarget::EXECUTABLE: + return "EXECUTABLE"; + break; + case cmTarget::UTILITY: + return "UTILITY"; + break; + case cmTarget::INSTALL_FILES: + return "INSTALL_FILES"; + break; + case cmTarget::INSTALL_PROGRAMS: + return "INSTALL_PROGRAMS"; + break; + } + return 0; + } + std::map<cmStdString,cmStdString>::const_iterator i = m_Properties.find(prop); if (i != m_Properties.end()) |