summaryrefslogtreecommitdiffstats
path: root/Source/cmAddExecutableCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-02 15:14:00 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-02 15:14:00 (GMT)
commit1d9f287af758b4a9cf8c35463ce98af1169cccf6 (patch)
tree6b437cb7c5e9de4ae2ea2d7c357095a2026b0e9a /Source/cmAddExecutableCommand.cxx
parent603b47c87a6b7bbf99dfd13e4b874ee51e528434 (diff)
downloadCMake-1d9f287af758b4a9cf8c35463ce98af1169cccf6.zip
CMake-1d9f287af758b4a9cf8c35463ce98af1169cccf6.tar.gz
CMake-1d9f287af758b4a9cf8c35463ce98af1169cccf6.tar.bz2
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 d44fa9a..2fe544d 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");