summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.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/cmMakefile.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/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 8799e52..29c3bde 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1281,7 +1281,8 @@ void cmMakefile::AddGlobalLinkInformation(const char* name, cmTarget& target)
void cmMakefile::AddLibrary(const char* lname, int shared,
- const std::vector<std::string> &srcs)
+ const std::vector<std::string> &srcs,
+ bool in_all)
{
cmTarget target;
switch (shared)
@@ -1303,7 +1304,7 @@ void cmMakefile::AddLibrary(const char* lname, int shared,
// over changes in CMakeLists.txt, making the information stale and
// hence useless.
target.ClearDependencyInformation( *this, lname );
- target.SetInAll(true);
+ target.SetInAll(in_all);
target.GetSourceLists() = srcs;
target.SetMakefile(this);
this->AddGlobalLinkInformation(lname, target);
@@ -1313,11 +1314,12 @@ void cmMakefile::AddLibrary(const char* lname, int shared,
}
cmTarget* cmMakefile::AddExecutable(const char *exeName,
- const std::vector<std::string> &srcs)
+ const std::vector<std::string> &srcs,
+ bool in_all)
{
cmTarget target;
target.SetType(cmTarget::EXECUTABLE, exeName);
- target.SetInAll(true);
+ target.SetInAll(in_all);
target.GetSourceLists() = srcs;
target.SetMakefile(this);
this->AddGlobalLinkInformation(exeName, target);