summaryrefslogtreecommitdiff
path: root/Source/cmAddExecutableCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-02 11:14:00 -0400
committerBrad King <brad.king@kitware.com>2006-10-02 11:14:00 -0400
commit1d9f287af758b4a9cf8c35463ce98af1169cccf6 (patch)
tree6b437cb7c5e9de4ae2ea2d7c357095a2026b0e9a /Source/cmAddExecutableCommand.cxx
parent603b47c87a6b7bbf99dfd13e4b874ee51e528434 (diff)
downloadcmake-1d9f287af758b4a9cf8c35463ce98af1169cccf6.tar.gz
ENH: Added NOT_IN_ALL option for ADD_LIBRARY and ADD_EXECUTABLE to avoid building the targets by default.
Diffstat (limited to 'Source/cmAddExecutableCommand.cxx')
-rw-r--r--Source/cmAddExecutableCommand.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx
index d44fa9aa89..2fe544d861 100644
--- a/Source/cmAddExecutableCommand.cxx
+++ b/Source/cmAddExecutableCommand.cxx
@@ -31,6 +31,7 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args)
++s;
bool use_win32 = false;
bool use_macbundle = false;
+ bool in_all = true;
while ( s != args.end() )
{
if (*s == "WIN32")
@@ -43,6 +44,11 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args)
++s;
use_macbundle = true;
}
+ else if(*s == "NOT_IN_ALL")
+ {
+ ++s;
+ in_all = false;
+ }
else
{
break;
@@ -57,7 +63,8 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args)
}
std::vector<std::string> srclists(s, args.end());
- cmTarget* tgt = this->Makefile->AddExecutable(exename.c_str(), srclists);
+ cmTarget* tgt = this->Makefile->AddExecutable(exename.c_str(), srclists,
+ in_all);
if ( use_win32 )
{
tgt->SetProperty("WIN32_EXECUTABLE", "ON");