summaryrefslogtreecommitdiffstats
path: root/Source/cmAddLibraryCommand.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/cmAddLibraryCommand.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/cmAddLibraryCommand.cxx')
-rw-r--r--Source/cmAddLibraryCommand.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index afcac0b..6b85d5f 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -28,6 +28,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
// otherwise it defaults to static library.
int shared =
!cmSystemTools::IsOff(this->Makefile->GetDefinition("BUILD_SHARED_LIBS"));
+ bool in_all = true;
std::vector<std::string>::const_iterator s = args.begin();
@@ -56,6 +57,11 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
++s;
shared = 2;
}
+ else if(*s == "NOT_IN_ALL")
+ {
+ ++s;
+ in_all = false;
+ }
}
if (s == args.end())
@@ -74,7 +80,8 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
++s;
}
- this->Makefile->AddLibrary(this->LibName.c_str(), shared, srclists);
+ this->Makefile->AddLibrary(this->LibName.c_str(), shared, srclists,
+ in_all);
return true;
}