summaryrefslogtreecommitdiffstats
path: root/Source/cmProjectCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-04-02 20:43:23 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-04-02 20:43:23 (GMT)
commit4ea0f6b9494f2b4a4a5a238f8ad51ee6fbbcfe0a (patch)
treeb73c04c8bce53edbdf39e3e98ae6e2a361f47bef /Source/cmProjectCommand.cxx
parent81ebecaea17cc18dfdda4fc3051eba08f6f076a0 (diff)
downloadCMake-4ea0f6b9494f2b4a4a5a238f8ad51ee6fbbcfe0a.zip
CMake-4ea0f6b9494f2b4a4a5a238f8ad51ee6fbbcfe0a.tar.gz
CMake-4ea0f6b9494f2b4a4a5a238f8ad51ee6fbbcfe0a.tar.bz2
ENH: add enable language support for PROJECT command, this means that a C only project can be built with cmake, even without a cxx compiler
Diffstat (limited to 'Source/cmProjectCommand.cxx')
-rw-r--r--Source/cmProjectCommand.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 197bccc..adfbed1 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -19,7 +19,7 @@
// cmProjectCommand
bool cmProjectCommand::InitialPass(std::vector<std::string> const& args)
{
- if(args.size() != 1 )
+ if(args.size() < 1 )
{
this->SetError("PROJECT called with incorrect number of arguments");
return false;
@@ -48,6 +48,17 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args)
m_Makefile->AddDefinition("PROJECT_NAME", args[0].c_str());
+ if(args.size() > 1)
+ {
+ for(size_t i =1; i < args.size(); ++i)
+ {
+ m_Makefile->EnableLanguage(args[i].c_str());
+ }
+ }
+ else
+ {
+ m_Makefile->EnableLanguage(0);
+ }
return true;
}